DXUTSetTimer
Installs a new timer.
HRESULT DXUTSetTimer(
LPDXUTCALLBACKTIMER pCallbackTimer,
FLOAT fTimeoutInSecs,
UINT * pnIDEvent,
void* pCallbackUserContext
);
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 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.
- pCallbackUserContext
- [in] Pointer to a user-defined value which is passed to the callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function. The default value is NULL
Return Values
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.
Requirements
Header: Declared in Dxut.h.
See Also
LPDXUTCALLBACKTIMER, DXUTKillTimer