EvPeriodic::__constructConstructs EvPeriodic watcher object Descriptionpublic
EvPeriodic::__construct(
float $offset
,string $interval
,callable $reschedule_cb
,callable $callback
,mixed $data
= null
,int $priority
= 0
) Constructs EvPeriodic watcher object and starts it automatically. EvPeriodic::createStopped method creates stopped periodic watcher. Parameters
ExamplesExample #1 Periodic timer. Use reschedule callback
Example #2 Periodic timer. Tick every 10.5 seconds starting at now
Example #3 Hourly watcher
See Also
|