EvPeriodic reschedule_cb error!

Issue #33 resolved
Former user created an issue

The following code is running incorrectly:

<?php
// Tick each 10.5 seconds

function reschedule_cb ($watcher, $now) {
 return $now + (10.5. - fmod($now, 10.5));
}

$w = new EvPeriodic(0., 0., "reschedule_cb", function ($w, $revents) {
 echo time(), PHP_EOL;
});
Ev::run();

PHP version: 7.1.10

The results are as follows:

1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837704
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705
1508837705

Comments (3)

  1. Log in to comment