Reference » Window classes » MWindow » getTimerDelay

Elgrint::MWindow::getTimerDelay(MNum) method

Declaration (see MWindow.h):

MNum getTimerDelay(MNum timerID);


Returns the delay (in milliseconds) of timerID as defined by setTimer.

Return type: MNum


Name Type Description
timerID MNum

The 0-based identifier of the timer.


Each legal timer ID (from 0 through MaxTimerID) is associated with a timing delay. By default, a delay is equal to None, which means that the corresponding timer is off. The setTimer function can set a new delay, and getTimerDelay returns this new delay until the timer expires and the resulting TimerExpired message is received. getTimerDelay returns None during the handling of the corresponding TimerExpired, at least until setTimer is called again (often during that same handling).

This function can be used to determine whether a timer with the given ID is available for use and is not already occupied (it is available if getTimerDelay returns None). Such usage is not common, though, since the occupied timer IDs should be known to the app (timers are set only programmatically), and with 2 billion and 1 valid IDs there is plenty of space to avoid ID collisions.

Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.