We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8edc07a commit c9d7d46Copy full SHA for c9d7d46
1 file changed
src/Scheduling/Timing/SystemClock.php
@@ -32,13 +32,14 @@ public function sleep(int $seconds): void
32
33
public function sleepUntil(DateTimeImmutable $date): void
34
{
35
- $now = $this->now();
+ $now = $this->now()->getTimestamp();
36
+ $target = $date->getTimestamp();
37
- if ($now >= $date) {
38
+ if ($target <= $now) {
39
return;
40
}
41
42
/** @psalm-suppress UnusedFunctionCall */
- \time_sleep_until($date->getTimestamp());
43
+ \time_sleep_until($target);
44
45
0 commit comments