XRootD
XrdClClassicCopyJob.cc File Reference
#include "XrdCl/XrdClClassicCopyJob.hh"
#include "XrdCl/XrdClConstants.hh"
#include "XrdCl/XrdClLog.hh"
#include "XrdCl/XrdClDefaultEnv.hh"
#include "XrdCl/XrdClFile.hh"
#include "XrdCl/XrdClMonitor.hh"
#include "XrdCl/XrdClUtils.hh"
#include "XrdCl/XrdClCheckSumManager.hh"
#include "XrdCks/XrdCksCalc.hh"
#include "XrdCl/XrdClRedirectorRegistry.hh"
#include "XrdCl/XrdClZipArchive.hh"
#include "XrdCl/XrdClZipOperations.hh"
#include "XrdCl/XrdClPostMaster.hh"
#include "XrdCl/XrdClJobManager.hh"
#include "XrdCl/XrdClXRootDTransport.hh"
#include "XrdClXCpCtx.hh"
#include "XrdCl/XrdClCheckSumHelper.hh"
#include "XrdSys/XrdSysE2T.hh"
#include "XrdSys/XrdSysPthread.hh"
#include <memory>
#include <mutex>
#include <queue>
#include <algorithm>
#include <chrono>
#include <thread>
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <cerrno>
#include <unistd.h>
#include <ctime>
+ Include dependency graph for XrdClClassicCopyJob.cc:

Go to the source code of this file.

Namespaces

 XrdCl
 

Functions

void sleep_nsec (long long nsec)
 
std::chrono::nanoseconds time_nsec ()
 
long long to_nsec (long long sec)
 

Function Documentation

◆ sleep_nsec()

void sleep_nsec ( long long  nsec)
inline

Definition at line 2398 of file XrdClClassicCopyJob.cc.

2399 {
2400 #if __cplusplus >= 201103L
2401  using namespace std::chrono;
2402  std::this_thread::sleep_for( nanoseconds( nsec ) );
2403 #else
2404  timespec req;
2405  req.tv_sec = nsec / to_nsec( 1 );
2406  req.tv_nsec = nsec % to_nsec( 1 );
2407  nanosleep( &req, 0 );
2408 #endif
2409 }
long long to_nsec(long long sec)

References to_nsec().

Referenced by XrdCl::ClassicCopyJob::Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ time_nsec()

std::chrono::nanoseconds time_nsec ( )
inline

Definition at line 2380 of file XrdClClassicCopyJob.cc.

2381 {
2382  using namespace std::chrono;
2383  auto since_epoch = high_resolution_clock::now().time_since_epoch();
2384  return duration_cast<nanoseconds>( since_epoch );
2385 }

Referenced by XrdCl::ClassicCopyJob::Run().

+ Here is the caller graph for this function:

◆ to_nsec()

long long to_nsec ( long long  sec)
inline

Definition at line 2390 of file XrdClClassicCopyJob.cc.

2391 {
2392  return sec * 1000000000;
2393 }

Referenced by XrdCl::ClassicCopyJob::Run(), and sleep_nsec().

+ Here is the caller graph for this function: