array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.pcntl-alarm.php', 1 => 'pcntl_alarm', ), 'up' => array ( 0 => 'ref.pcntl.php', 1 => 'PCNTL 関数', ), 'prev' => array ( 0 => 'ref.pcntl.php', 1 => 'PCNTL 関数', ), 'next' => array ( 0 => 'function.pcntl-async-signals.php', 1 => 'pcntl_async_signals', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/pcntl/functions/pcntl-alarm.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
pcntl_alarm — シグナルを送信するアラームを設定する
プロセスに対して、
指定した秒数後に SIGALRM
シグナルを送信するタイマーを作成します。
pcntl_alarm() をコールすると、
それまでに設定されていたアラームはすべて取り消されます。
seconds
待機する秒数。seconds
がゼロの場合は、
新しいアラームは作成されません。
それまでに予定されていたアラームの予定時刻までの秒数を返します。
事前に予定されていたアラームがなかった場合には
0
を返します。