TimerSetEvent |
Top Previous Next |
Message
TimerSetEvent <duration> <reloadcount> <message>
Originator
Client
Response (immediate socket)
Success Failure
Response (main socket)
Info: TimerCreated: duration <duration> reloadcount <reloadcount> Error: TimerRefused: <reason> SyntaxError: invalid parameters to TimerSetEvent SyntaxError: insufficient parameters to TimerSetEvent
Details
You do not specify the duration with which the timer is reloaded, but the number of times that it is reloaded with its original duration. (For those of you used to Arachnid, this represents a significant change in the way timers are used.) The reload value –1 has a special significance: it means that the timer should be reloaded for eternity (i.e. until you manually kill it). Use 0 for a one-off timer, 1 for a timer that is reloaded once (i.e. executes twice in total), and so on. In fact, all negative numbers are treated the same way as –1.
You may request a zero-duration timer; it'll be activated as soon as the server next polls the set of active timers.
SDK Control Method
TimerSetEvent(Event as String, msDelay as long, Repetitions as integer) as Boolean
Requests event message Event, after a delay of msDelay ms, subsequently repeated Repetitions times. Function will evaluate to True for success, False for failure.
ClientLib
bool TimerSetEvent(const CString& strEvent, unsigned long timeInMs, int iRepetitions);
Requests event message strEvent, after a delay of timeInMS ms, subsequently repeated iRepetitions times. Returns true for success, false for failure.
Revision history
Implemented in WhiskerServer version 1 as RequestTimerEvent. Renamed in WhiskerServer version 2.3.
See also
|