« Back to Product

Documentation

IPS_TimerExists

 bool IPS_TimerExists (int $TimerID) 

Parameters

TimerID

ID of the timer to be checked

Returns

If the timer exists, TRUE is returned, otherwise FALSE.

Description

The function checks whether the timer with the ID TimerID exists.

Timers are registered by instances, e.g. by PHP modules with RegisterTimer and SetTimerInterval or as one-time timers with RegisterOnceTimer. The built-in modules use timers as well, e.g. "SearchExpires" for the end of the search mode. The TimerIDs are assigned at runtime and are not persistent, one-time timers disappear after their execution. Script timers (IPS_SetScriptTimer) are cyclic events and do not belong to these timers.

Example

if (IPS_TimerExists(7)) {
    print_r(IPS_GetTimer(7));
}
Any questions?