Agora  1.2.0
Agora project
GetTime Namespace Reference

Functions

static double GetTimeUs ()
 
static double GetTime ()
 
static size_t Rdtsc ()
 Return the TSC. More...
 
static size_t WorkerRdtsc ()
 
static void NanoSleep (size_t ns, double freq_ghz)
 Sleep for some nanoseconds. More...
 
static double MeasureRdtscFreq ()
 
static double CyclesToSec (size_t cycles, double freq_ghz)
 Convert cycles measured by rdtsc with frequence freq_ghz to seconds. More...
 
static double CyclesToMs (size_t cycles, double freq_ghz)
 
static double CyclesToUs (size_t cycles, double freq_ghz)
 
static double CyclesToNs (size_t cycles, double freq_ghz)
 
static size_t MsToCycles (double ms, double freq_ghz)
 
static size_t UsToCycles (double us, double freq_ghz)
 
static size_t NsToCycles (double ns, double freq_ghz)
 
static double SecSince (const struct timespec &t0)
 Return seconds elapsed since timestamp t0. More...
 
static double NsSince (const struct timespec &t0)
 Return nanoseconds elapsed since timestamp t0. More...
 

Function Documentation

◆ CyclesToMs()

static double GetTime::CyclesToMs ( size_t  cycles,
double  freq_ghz 
)
inlinestatic

Convert cycles measured by rdtsc with frequence freq_ghz to milliseconds

Here is the caller graph for this function:

◆ CyclesToNs()

static double GetTime::CyclesToNs ( size_t  cycles,
double  freq_ghz 
)
inlinestatic

Convert cycles measured by rdtsc with frequence freq_ghz to nanoseconds

Here is the caller graph for this function:

◆ CyclesToSec()

static double GetTime::CyclesToSec ( size_t  cycles,
double  freq_ghz 
)
inlinestatic

Convert cycles measured by rdtsc with frequence freq_ghz to seconds.

◆ CyclesToUs()

static double GetTime::CyclesToUs ( size_t  cycles,
double  freq_ghz 
)
inlinestatic

Convert cycles measured by rdtsc with frequence freq_ghz to microseconds

Here is the caller graph for this function:

◆ GetTime()

static double GetTime::GetTime ( )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTimeUs()

static double GetTime::GetTimeUs ( )
inlinestatic
Here is the caller graph for this function:

◆ MeasureRdtscFreq()

static double GetTime::MeasureRdtscFreq ( )
inlinestatic

Measure the frequency of RDTSC based by comparing against CLOCK_REALTIME. This is a pretty function that should be called only during initialization.

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

◆ MsToCycles()

static size_t GetTime::MsToCycles ( double  ms,
double  freq_ghz 
)
inlinestatic

◆ NanoSleep()

static void GetTime::NanoSleep ( size_t  ns,
double  freq_ghz 
)
inlinestatic

Sleep for some nanoseconds.

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

◆ NsSince()

static double GetTime::NsSince ( const struct timespec &  t0)
inlinestatic

Return nanoseconds elapsed since timestamp t0.

◆ NsToCycles()

static size_t GetTime::NsToCycles ( double  ns,
double  freq_ghz 
)
inlinestatic

◆ Rdtsc()

static size_t GetTime::Rdtsc ( )
inlinestatic

Return the TSC.

Here is the caller graph for this function:

◆ SecSince()

static double GetTime::SecSince ( const struct timespec &  t0)
inlinestatic

Return seconds elapsed since timestamp t0.

◆ UsToCycles()

static size_t GetTime::UsToCycles ( double  us,
double  freq_ghz 
)
inlinestatic

◆ WorkerRdtsc()

static size_t GetTime::WorkerRdtsc ( )
inlinestatic

Return the TSC or zero, depending on whether timing of workers is enabled

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