ADTF
3.18.2
|
High resolution timer. More...
Public Member Functions | |
cHighResTimer () | |
Default constructor. | |
virtual | ~cHighResTimer () |
Destructor. | |
tResult | Create (tUInt uiDelay) |
Allocates all resources, registers timer with OS. More... | |
tResult | Release () |
Releases all allocated resources. More... | |
tVoid | Sleep (tUInt uiTimeout) |
Pauses the calling thread for a specified time. More... | |
tVoid | SleepMicroSeconds (tTimeStamp tmTimeout) |
Pauses the calling thread for a specified time. More... | |
Static Public Member Functions | |
static tTimeStamp | GetTime () |
Returns the current time in microseconds. More... | |
static tUInt | GetMinimumResolution () |
returns the minimum resolution More... | |
static tUInt | GetMaximumResolution () |
returns the maximum resolution More... | |
Static Private Member Functions | |
static void | TimerProc (tUInt32 uiID, tUInt32 uiMsg, tUInt32 dwUser, tUInt32 dw1, tUInt32 dw2) |
High resolution timer.
Provides a better resolution than the standard system timer. Warning: This class is not shared between different objects files and no reference time, therefore the time is not synchronized between different plugins. Be sure to use IReferenceClock instead, when you need a synchronized time. Important for Windows: cHighResTimer is NOT thread safe
Definition at line 22 of file highrestimer.h.
Allocates all resources, registers timer with OS.
uiDelay | [in] The initial delay before the timer will call its handling function, thus the minimum delay before the first Sleep() returns. Must be at least 1. |
|
static |
returns the maximum resolution
0 | error case |
|
static |
returns the minimum resolution
0 | error case |
|
static |
Returns the current time in microseconds.
This function will get the high precision time of the cpu frequency ticks.
tResult Release | ( | ) |
Releases all allocated resources.
Pauses the calling thread for a specified time.
uiTimeout | [in] The time to sleep in milliseconds. |
tVoid SleepMicroSeconds | ( | tTimeStamp | tmTimeout | ) |
Pauses the calling thread for a specified time.
tmTimeout | [in] The time to sleep in microsecondsseconds. |