EvPeriodic::__constructConstructs EvPeriodic watcher object Description
public
EvPeriodic::__construct
(
double
$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
Return ValuesReturns EvPeriodic object on success. ExamplesExample #1 Periodic timer. Use reschedule callback
<?php Example #2 Periodic timer. Tick every 10.5 seconds starting at now
<?php Example #3 Hourly watcher
<?php See Also
|