Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
21 | 4 | public function schedule(callable $tick): void |
|
22 | { |
||
23 | // Tick every 60 seconds |
||
24 | $this->loop->addPeriodicTimer(60, function () use ($tick): void { |
||
25 | 2 | $tick(); |
|
26 | 4 | }); |
|
27 | |||
28 | // Initial tick because some actions might want to run in this minute |
||
29 | 4 | $tick(); |
|
30 | 4 | } |
|
31 | } |
||
32 |