Add periodic, or repeating, timer events

r1559 | dcl | 2007-03-01 09:03:07 +1100 (Thu, 01 Mar 2007) | 2 lines
This commit is contained in:
Douglas Clowes
2007-03-01 09:03:07 +11:00
parent e57006789b
commit 029c9cc982
2 changed files with 71 additions and 2 deletions

View File

@@ -39,6 +39,21 @@ typedef struct __netwatchtimer *pNWTimer;
int NetWatchRegisterTimer(pNWTimer* handle, int mSec,
pNWCallback callback, void* context);
/**
* \brief register a periodic timer
*
* \param handle pointer to location to receive the timer object handle
* \param mSec milliseconds after which the timer should expire
* \param mSecPeriod milliseconds after which the timer should repeat
* \param callback function when timer expires
* \param context abstract context passed to callback function
* \return success=1, failure=0
*/
int NetWatchRegisterTimerPeriodic(pNWTimer* handle, int mSecInitial, int mSecPeriod,
pNWCallback callback, void* context);
int NetWatchGetTimerPeriod(pNWTimer handle);
int NetWatchSetTimerPeriod(pNWTimer handle, int mSecPeriod);
/**
* \brief remove a registered timer event
*