#include <clock.hpp>
Inheritance diagram for Clock:
Public Member Functions | |
Clock () | |
Constructor. | |
~Clock () | |
Destructor. | |
void | getClock (timespec &) |
Get time and write it to a timspec structure. | |
void | zeroClock () |
void | calculateClockResolution (timespec &) |
Calculate the resolution of the clock. | |
Protected Attributes | |
timespec | zero |
This class is used for measuring time in PTF. The implementation tries to use the best timer available for the system. On Linux the POSIX realtime clock is used. On MacOS X it is the Mach timer.
Definition at line 30 of file clock.hpp.
|
Constructor. Definition at line 64 of file clock.cpp. References calculateClockResolution(), PtfCore::getMessageLog(), Singleton< PtfCore >::getSingleton(), MESSAGE, and WARNING. Here is the call graph for this function: ![]() |
|
Destructor. |
|
Calculate the resolution of the clock. Most systems report a false clock resolution. So here it is calculated. The resolution is the value that is added when the clock changes.
References getClock(). Referenced by Clock(). Here is the call graph for this function: ![]() |
|
Get time and write it to a timspec structure.
References PtfCore::getMessageLog(), and Singleton< PtfCore >::getSingleton(). Referenced by calculateClockResolution(), TimeInterval::measureA(), and TimeInterval::measureB(). Here is the call graph for this function: ![]() |
|
|
|