swoole_process::alarm

�߾��ȶ�ʱ�����Dz���ϵͳsetitimerϵͳ���õķ�װ����������΢���Ķ�ʱ������ʱ���ᴥ���źţ���Ҫ��swoole_process::signal��pcntl_signal���ʹ�á�

function swoole_process::alarm(int $interval_usec, int $type = ITIMER_REAL) : bool

alarm���ܺ�Swoole\Timerͬʱʹ��
alarm��1.8.13����߰汾����

ʹ��ʵ��

swoole_process::signal(SIGALRM, function () {
    static $i = 0;
    echo "#{$i}\talarm\n";
    $i++;
    if ($i > 20) {
        swoole_process::alarm(-1);
    }
});

//100ms
swoole_process::alarm(100 * 1000);