v1.2 - kfun - call_out


call_out - call function with delay


int call_out(string function, mixed delay, mixed args...)


Call a function in the current object with a delay. The function to be called must not be private. The delay is specified in seconds. The minimum delay is 0 seconds, for a function that is to be called as soon as possible after termination of the current thread. If the delay is an integer, the function will be called after approximately the specified number of seconds. Otherwise, the delay must be a floating point number less than or equal to 60.0, and the function will be called with a millisecond resolution. The returned value is the callout handle, an integer > 0 which must be used if the callout is to be removed.


If the number of active delayed calls in the system is equal to the value of the ST_COTABSIZE field of the array returned by status(), where ST_COTABSIZE is defined in the include file <status.h>, attempting to add another one will result in an error. If the maximum number of callouts is set to 0, no delayed call will be added, and no error will be caused.