run_at (function f, integer time) ⇒ boolean
Runs a function or lambda function within a separate thread at a specific time in the form of an epoch time.
First available: Version 1.8.1
Notes
This function is similar to the Unix command at.
This function can be used nicely in conjunction with the time
function added in the same version.
ZPE 1.10.7+
ZPE 1.10.7 (Hasty Hyena) changed the way that the run_at command works, completely overhauling the system, making it more efficient.
It also is much easier to cancel, using the predefined interupt function on it:
YASS
function beeper() beep(random_number(1, 1000) * 1000, 1000)) end function //This will make a random beep in 10 seconds time $scheduled = run_in(handle_of("beeper"), time() + 10000) $scheduled->interupt()

Comments powered by BalfComment