world.EnableTimer
Enables or disables an timer
Prototype
long EnableTimer(BSTR TimerName, BOOL Enabled);
Description
Enables or disables the named timer. An enabled timer is "active", otherwise it is ignored when processing periodic events.
VBscript example
world.EnableTimer "heartbeat", TRUE
Jscript example
world.EnableTimer("heartbeat", true);
PerlScript example
$world->EnableTimer("heartbeat", true);
Python example
world.EnableTimer("heartbeat", True)
Lua example
EnableTimer("heartbeat", true)
Lua notes
The enabled flag is optional, and defaults to true.
Return value
eInvalidObjectLabel: The timer name is not valid
eTimerNotFound: The named timer does not exist
eOK: completed OK
Related topic
See also
| Function | Description |
|---|---|
| DeleteTimer | Deletes a timer |
| GetTimer | Gets details about a timer |
| GetTimerInfo | Gets details about a timer |
| GetTimerList | Gets the list of timers |
| IsTimer | Tests to see if a timer exists |
| ResetTimer | Resets a named timer |
| ResetTimers | Resets all timers |