| 1 | <?php |
||
| 11 | class Timer |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var EventLoop |
||
| 15 | */ |
||
| 16 | protected $loop; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var float |
||
| 20 | */ |
||
| 21 | protected $interval; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var callable |
||
| 25 | */ |
||
| 26 | protected $callback; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var bool |
||
| 30 | */ |
||
| 31 | protected $periodic; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var int |
||
| 35 | */ |
||
| 36 | protected $priority; |
||
| 37 | |||
| 38 | public function __construct( |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return EventLoop |
||
| 54 | */ |
||
| 55 | public function getLoop() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return float |
||
| 62 | */ |
||
| 63 | public function getInterval() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return callable |
||
| 70 | */ |
||
| 71 | public function getCallback() |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return boolean |
||
| 78 | */ |
||
| 79 | public function isPeriodic() |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return int |
||
| 86 | */ |
||
| 87 | public function getPriority() |
||
| 91 | |||
| 92 | public function cancel() |
||
| 96 | } |
||
| 97 |