![]() |
![]() |
![]() |
Installs a new timer.
Syntax
HRESULT DXUTSetTimer(
LPDXUTCALLBACKTIMER pCallbackTimer, FLOAT fTimeoutInSecs, UINT *pnIDEvent );
Parameters
- pCallbackTimer
- [in] Pointer to a timer callback function. The callback function is to be called at the specified fTimeoutInSecs timeout intervals. May not be NULL.
- fTimeoutInSecs
- [in] Interval, in seconds, between successive calls to the timer callback function. The default value is 1.0f.
- pnIDEvent
- [in] Optional pointer to a variable to receive the event identifier (ID) for the new timer. This event ID will be passed to the timer callback function to indicate which timer generated the event, allowing the application to use a single callback function for multiple timers. The default value is NULL.
Return Value
If the function succeeds, the return value is S_OK.If the function fails, the return value can be one of the error codes in DXUTERR.
Remarks
Timers created with DXUTSetTimer can be destroyed with DXUTKillTimer.
Function Information
Header dxut.h Import library None Minimum operating systems Windows 98
See Also
LPDXUTCALLBACKTIMER, DXUTKillTimer