Table of Contents

 
TimeUp
 

Purpose

Determines if the timer has reached its alarm of time elapsed

 

Protoype

bool CTimerMngr::TimeUp (string str_timer, bool b_active = false, bool b_remove = false)
 

Parameters

timer the ID of the timer to check
active whether to restart (TRUE) or disable (FALSE) the timer
remove wether to remove (TRUE) the timer when it expires or not (FALSE)
 

Description

This function checks to see whether or not the timer object has reached or exceeded its alarm setting. This means that, currently, all timers do need to be polled. If the alarm has been reached, then the function returns TRUE, otherwise it returns FALSE. The second parameter only comes into effect if the timer has reached its alarm. If you want the timer to rollback and restart from 0, then pass in TRUE, otherwise pass in FALSE to stop the timer. If you want the timer to automatically be removed from the manager when it expires, then you must pass in TRUE for b_remove.

 

Use

CTimerMngr timer;
if (timer.TimeUp("my_timer"))
    // timer has expired
 

Prev: TimeUntil