#include <TSCClock.hh>

Public Member Functions | |
| TSCClock () | |
| virtual double | getResolution () |
| Get the clock resolution in nano-seconds. | |
| virtual uint64_t | getCurrentTicksValue () |
| Get the current ticks value. | |
| virtual double | tick2NanoSecond (const uint64_t ticks) |
| Convert a number of ticks into a double value representing nanoseconds. | |
| virtual | ~TSCClock () |
Private Member Functions | |
| uint64_t | readTSC () |
| Read the Time Stamp Counter using rdtsc assembly instruction. | |
Static Private Member Functions | |
| static double | getProcessorFrequency () |
| Get processor frequency. | |
Private Attributes | |
| double | resolution |
| The TSC clock resolution in nano-seconds. | |
If you want a more "robust" Clock class you may use PosixClock.
Definition at line 18 of file TSCClock.hh.
| TSCClock | ( | ) |
Definition at line 8 of file TSCClock.cc.
References TSCClock::getProcessorFrequency(), and TSCClock::resolution.

| ~TSCClock | ( | ) | [virtual] |
Definition at line 28 of file TSCClock.cc.
| double getResolution | ( | ) | [virtual] |
Get the clock resolution in nano-seconds.
Implements Clock.
Definition at line 14 of file TSCClock.cc.
References TSCClock::resolution.
| uint64_t getCurrentTicksValue | ( | ) | [virtual] |
Get the current ticks value.
Implements Clock.
Definition at line 19 of file TSCClock.cc.
References TSCClock::readTSC().

| double tick2NanoSecond | ( | const uint64_t | ticks | ) | [virtual] |
Convert a number of ticks into a double value representing nanoseconds.
| [in] | ticks | the number of tick to convert |
Implements Clock.
Definition at line 24 of file TSCClock.cc.
References TSCClock::resolution.
| double getProcessorFrequency | ( | ) | [static, private] |
Get processor frequency.
Definition at line 32 of file TSCClock.cc.
Referenced by TSCClock::TSCClock().
| uint64_t readTSC | ( | ) | [inline, private] |
Read the Time Stamp Counter using rdtsc assembly instruction.
Definition at line 51 of file TSCClock.hh.
Referenced by TSCClock::getCurrentTicksValue().
double resolution [private] |
The TSC clock resolution in nano-seconds.
Definition at line 55 of file TSCClock.hh.
Referenced by TSCClock::getResolution(), TSCClock::tick2NanoSecond(), and TSCClock::TSCClock().
1.5.5