| Table of Contents | ||||||
|
|
||||||
| ResetTimer | ||||||
|
Purpose Resets the start time of the timer |
||||||
|
Protoype void CTimerMngr::ResetTimer (string str_timer, int i_new_alarm = OLD_ALARM, bool b_active = false) |
||||||
|
Parameters
|
||||||
|
Description This function resets a timer and gives you options as well. When a timer is reset its elapsed time is reset to 0. You can change the timer alarm if you wish by passing a new alarm value (in milliseconds) for i_new_alarm. If you do not wish to set a new alarm then use OLD_ALARM instead, which will tell the function to retain the timer's previous alarm setting. The last option is the ability to keep the timer running after it has restarted. If you want the timer to run after it has been reset then pass in TRUE for b_active, otherwise pass in FALSE. |
||||||
|
Use CTimerMngr timer; // reset timer and do nothing
timer.ResetTimer("my_timer");
// reset, enable and change alarm
timer.ResetTimer("my_timer", 3000, true);
|
||||||
|
|
||||||
|