Skip to content

Commit cbab35f

Browse files
author
Andrew Minerd
committed
always use a fresh time when scheduling a timer; fixes #42
1 parent 164799f commit cbab35f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Timer/Timers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getTime()
3030
public function add(TimerInterface $timer)
3131
{
3232
$interval = $timer->getInterval();
33-
$scheduledAt = $interval + $this->getTime();
33+
$scheduledAt = $interval + microtime(true);
3434

3535
$this->timers->attach($timer, $scheduledAt);
3636
$this->scheduler->insert($timer, -$scheduledAt);

0 commit comments

Comments
 (0)