| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function addTimer(TimerInterface $timer) |
||
| 36 | { |
||
| 37 | $eventLoop = $this->getEventLoop(); |
||
| 38 | if ($timer->isPeriodic()) { |
||
| 39 | $reactTimer = $eventLoop->addPeriodicTimer($timer->getInterval(), $timer); |
||
| 40 | } else { |
||
| 41 | $reactTimer = $eventLoop->addTimer($timer->getInterval(), $timer); |
||
| 42 | } |
||
| 43 | $this->timers[] = $timer; |
||
| 44 | $this->reactTimers[spl_object_hash($timer)] = $reactTimer; |
||
| 45 | } |
||
| 46 | |||
| 74 | } |