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 2399 of file XrdClClassicCopyJob.cc.

2400 {
2401 #if __cplusplus >= 201103L
2402  using namespace std::chrono;
2403  std::this_thread::sleep_for( nanoseconds( nsec ) );
2404 #else
2405  timespec req;
2406  req.tv_sec = nsec / to_nsec( 1 );
2407  req.tv_nsec = nsec % to_nsec( 1 );
2408  nanosleep( &req, 0 );
2409 #endif
2410 }
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 2381 of file XrdClClassicCopyJob.cc.

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

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 2391 of file XrdClClassicCopyJob.cc.

2392 {
2393  return sec * 1000000000;
2394 }

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

+ Here is the caller graph for this function: