Time down counter until TimeZero is reached More...
Time down counter until TimeZero is reached
Public Member Methods | |
DownTimer (TimeSpan duration=TimeZero) | |
Constructor. More... | |
void | SetTime (TimeSpan duration) |
Sets the timer duration. More... | |
void | Clear () |
Set the time to TimeZero More... | |
TimeSpan | GetTime () const |
Gets the remaining time. More... | |
bool | GetElapsed () const |
Query if the counter has elapsed. More... | |
Constructor.
duration | (optional) timer duration. |
void Clear | ( | ) |
Set the time to TimeZero
bool GetElapsed | ( | ) | const |
Query if the counter has elapsed.
TimeSpan GetTime | ( | ) | const |
Gets the remaining time.
void SetTime | ( | TimeSpan | duration | ) |
Sets the timer duration.
duration | The duration. |
Duration can be negative. In this case GetElapsed will answer directly true.