Logo Search packages:      
Sourcecode: scummvm version File versions

virtual void OSystem::setTimerCallback ( TimerProc  callback,
int  interval 
) [pure virtual]

Set the timer callback, a function which is periodically invoked by the backend. This can for example be done via a background thread. There is at most one active timer; if this method is called while there is already an active timer, then the new timer callback should replace the previous one. In particular, passing a callback pointer value of 0 is legal and can be used to clear the current timer callback.

See also:
Common::Timer
Note:
The implementation of this method must be 'atomic' in the sense that when the method returns, the previously set callback must not be in use anymore (in particular, if timers are implemented via threads, then it must be ensured that the timer thread is not using the old callback function anymore).
Parameters:
callback pointer to the callback. May be 0 to reset the timer
interval the interval (in milliseconds) between invocations of the callback


Generated by  Doxygen 1.6.0   Back to index