.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" This manpage is Copyright (C) 1992 Drew Eckhardt; .\" 1993 Michael Haardt, Ian Jackson. .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified Wed Jul 21 19:42:57 1993 by Rik Faith .\" Modified Sun Jul 21 21:25:26 1996 by Andries Brouwer .\" Modified Wed Nov 6 03:46:05 1996 by Eric S. Raymond .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH ALARM 2 2008\-06\-12 Linux "Linux Programmer's Manual" .SH 名前 alarm \- シグナル配送のためのアラーム・クロックを設定する .SH 書式 .nf \fB#include \fP .sp \fBunsigned int alarm(unsigned int \fP\fIseconds\fP\fB);\fP .fi .SH 説明 \fBalarm\fP() は \fBSIGALRM\fP シグナルを \fIseconds\fP 秒後に呼び出したプロセスに配送するように手配する。 \fIseconds\fP がゼロならば、新たな \fBalarm\fP() は手配されない。 今までに設定されていた \fBalarm\fP() は中断される。 .SH 返り値 \fBalarm\fP() は以前に予定されていたアラームの配送までの残り時間を返す。以前に アラームが予定されていなければゼロを返す。 .SH 準拠 SVr4, POSIX.1\-2001, 4.3BSD. .SH 注意 \fBalarm\fP() と \fBsetitimer\fP(2) は同じタイマーを共有している; 片方を呼び出すことはもう一方の 使用に影響を与える。 .PP \fBsleep\fP(3) は \fBSIGALRM\fP を利用して実装されているかもしれない。 \fBalarm\fP() と \fBsleep\fP(3) を混ぜて使用してはならない。 スケジューリング(scheduling)の遅延により、プロセスの実行に不定量の 遅延が起きる可能性がある。 .SH 関連項目 \fBgettimeofday\fP(2), \fBpause\fP(2), \fBselect\fP(2), \fBsetitimer\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2), \fBsleep\fP(3), \fBtime\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。