Download the PHP package mrtwenty/timer without Composer
On this page you can find all versions of the php package mrtwenty/timer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package timer
timer
php定时器,参考了workerman源码,由于workerman源码太过复杂, 故而抽取了一些出来,重新整理出来,实现一个单进程(守护进程)的定时器。
原理
- 利用pcntl,守护进程化
- 利用stream_select的超时机制,来实现sleep,如果有event扩展的话,优先使用event扩展
- 定时器是时间堆的方式实现,利用php的spl的优先队列
使用方式
1.安装
2.编写index.php
- 在cli环境上执行:
All versions of timer with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3
The package mrtwenty/timer contains the following files
Loading the files please wait ....