setInterval()
/**
* This function is used to run a callback in the event loop with interval
*/
public static function setInterval(callable $callback, int $interval): SampleMacro;System::setInterval(function() {
var_dump("Hello World!");
}, 1000);$interval = System::setInterval(function() {
var_dump("Hello World!");
}, 1000);
System::clearInterval($interval);Last updated