Represents a high-resolution timer. More...
Public Member Functions | |
long | GetDelta () |
void | Reset () |
Resets the timer to its initial state. More... | |
void | Restart () |
Restarts the timer, setting the elapsed time to zero and starting it. More... | |
void | Start () |
Starts the timer if it is not already running. More... | |
void | Stop () |
Stops the timer if it is running and updates the elapsed time. More... | |
Static Public Member Functions | |
static Timer | StartNew () |
Creates and starts a new timer. More... | |
Public Attributes | |
long | _elapsed |
byte | _running |
long | _start |
Properties | |
double | ElapsedInMilliseconds [get] |
Gets the elapsed time in milliseconds. More... | |
double | ElapsedInSeconds [get] |
Gets the elapsed time in seconds. More... | |
long? | ElapsedInTicks [get] |
Gets the elapsed time in ticks. More... | |
bool | IsRunning [get] |
Gets a value indicating whether the timer is running. More... | |
Represents a high-resolution timer.
void Reset | ( | ) |
Resets the timer to its initial state.
void Restart | ( | ) |
Restarts the timer, setting the elapsed time to zero and starting it.
void Start | ( | ) |
Starts the timer if it is not already running.
|
static |
Creates and starts a new timer.
void Stop | ( | ) |
Stops the timer if it is running and updates the elapsed time.
|
get |
Gets the elapsed time in milliseconds.
|
get |
Gets the elapsed time in seconds.
|
get |
Gets the elapsed time in ticks.
|
get |
Gets a value indicating whether the timer is running.