lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::SysClk Class Reference

Static clock helpers. More...

#include <SysClk.hh>

Static Public Member Functions

static unsigned sample ()
 Return the current nanosecond field of CLOCK_REALTIME (on VxWorks, the processor time base).
 
static double nsPerTick ()
 Return 1.0 (60.0 on VxWorks), the nanoseconds per sample tick.
 
static unsigned since (unsigned prev)
 Return the ticks elapsed since prev, allowing for one wrap of the nanosecond field at one second.
 
static long long int diff (const timespec &end, const timespec &start)
 Return end minus start in nanoseconds.
 

Detailed Description

Static clock helpers.

On non-VxWorks builds a sample is the nanosecond field of CLOCK_REALTIME (1 ns per tick).

Member Function Documentation

◆ diff()

static long long int Pds::SysClk::diff ( const timespec &  end,
const timespec &  start 
)
static

Return end minus start in nanoseconds.

◆ nsPerTick()

double Pds::SysClk::nsPerTick ( )
inlinestatic

Return 1.0 (60.0 on VxWorks), the nanoseconds per sample tick.

◆ sample()

unsigned Pds::SysClk::sample ( )
inlinestatic

Return the current nanosecond field of CLOCK_REALTIME (on VxWorks, the processor time base).

◆ since()

unsigned Pds::SysClk::since ( unsigned  prev)
inlinestatic

Return the ticks elapsed since prev, allowing for one wrap of the nanosecond field at one second.


The documentation for this class was generated from the following file: