mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
61 lines
2.1 KiB
HTML
61 lines
2.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>为进程设置一个alarm闹钟信号</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.pcntl-alarm" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">pcntl_alarm</h1>
|
||
<p class="verinfo">(PHP 4 >= 4.3.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">pcntl_alarm</span> — <span class="dc-title">为进程设置一个alarm闹钟信号</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.pcntl-alarm-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>pcntl_alarm</strong></span>
|
||
( <span class="methodparam"><span class="type">int</span> <code class="parameter">$seconds</code></span>
|
||
) : <span class="type">int</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
创建一个计时器,在指定的秒数后向进程发送一个<strong><code>SIGALRM</code></strong>信号。每次对
|
||
<span class="function"><strong>pcntl_alarm()</strong></span>的调用都会取消之前设置的alarm信号。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.pcntl-alarm-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">seconds</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
等待的秒数。如果<code class="parameter">seconds</code>设置为0,将不会创建alarm信号。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.pcntl-alarm-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
返回上次alarm调度(离alarm信号发送)剩余的秒数,或者之前没有alarm调度(译注:或者之前调度已完成)
|
||
时返回<em>0</em>。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
</div></div></div></body></html> |