CreateTimer

Last Updated2022-05-04
Created At2007-03-14

Creates a basic timer. Calling CloseHandle() on a timer will end the timer.

native Handle CreateTimer(float interval, Timer func, any data = 0, int flags = 0)

Parameters

float interval
Interval from the current game time to execute the given function.
Timer func
Function to execute once the given interval has elapsed.
any data
Handle or value to pass through to the timer callback function.
int flags
Flags to set (such as repeatability or auto-Handle closing).

Return Value

Handle Handle to the timer object. You do not need to call CloseHandle(). If the timer could not be created, INVALID_HANDLE will be returned.