| @@ 73-79 (lines=7) @@ | ||
| 70 | ||
| 71 | $currentSecond = (int)\date('s', (int)$this->time()); |
|
| 72 | ||
| 73 | if ($currentSecond >= 1 && $currentSecond <= 55) { |
|
| 74 | $this->loop->addTimer(55 - $currentSecond, function (): void { |
|
| 75 | $this->align(); |
|
| 76 | }); |
|
| 77 | ||
| 78 | return; |
|
| 79 | } |
|
| 80 | ||
| 81 | if ($currentSecond > 55 && $currentSecond <= 58) { |
|
| 82 | $this->loop->addTimer(1, function (): void { |
|
| @@ 81-87 (lines=7) @@ | ||
| 78 | return; |
|
| 79 | } |
|
| 80 | ||
| 81 | if ($currentSecond > 55 && $currentSecond <= 58) { |
|
| 82 | $this->loop->addTimer(1, function (): void { |
|
| 83 | $this->align(); |
|
| 84 | }); |
|
| 85 | ||
| 86 | return; |
|
| 87 | } |
|
| 88 | ||
| 89 | if ($currentSecond === 59) { |
|
| 90 | $this->loop->addTimer(0.001, function (): void { |
|