mirror of
https://github.com/danog/amp.git
synced 2025-01-22 05:11:42 +01:00
Fix broken Reactor::at millisecond resolutions
This commit is contained in:
parent
b0a76277bb
commit
4fda4967b2
@ -64,9 +64,9 @@ class LibeventReactor implements SignalReactor {
|
||||
);
|
||||
}
|
||||
|
||||
$delay = $executeAt - $now;
|
||||
$msDelay = ($executeAt - $now) * $this->resolution;
|
||||
|
||||
return $this->once($callback, $delay);
|
||||
return $this->once($callback, $msDelay);
|
||||
}
|
||||
|
||||
public function immediately(callable $callback) {
|
||||
|
@ -153,9 +153,9 @@ class NativeReactor implements Reactor {
|
||||
);
|
||||
}
|
||||
|
||||
$delay = $executeAt - $now;
|
||||
$msDelay = ($executeAt - $now) * $this->resolution;
|
||||
|
||||
return $this->once($callback, $delay);
|
||||
return $this->once($callback, $msDelay);
|
||||
}
|
||||
|
||||
public function immediately(callable $callback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user