.\" 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, Rik Faith .\" Modified Sun Jul 21 21:25:26 1996, Andries Brouwer .\" Modified Wed Nov 6 03:46:05 1996 by Eric S. Raymond .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated Wed Feb 22 20:02:18 JST 1997 .\" by HANATAKA Shinya .\" .\"WORD: alarm アラーム .\"WORD: signal シグナル .\"WORD: clock クロック .\"WORD: process プロセス .\"WORD: timer タイマー .\"WORD: scheduling スケジューリング .\" .TH ALARM 2 2008-06-12 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O alarm \- set an alarm clock for delivery of a signal alarm \- シグナル配送のためのアラーム・クロックを設定する .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "unsigned int alarm(unsigned int " seconds ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O .BR alarm () .\"O arranges for a .\"O .B SIGALRM .\"O signal to be delivered to the calling process in .\"O .I seconds .\"O seconds. .BR alarm () は .B SIGALRM シグナルを .I seconds 秒後に呼び出したプロセスに配送するように手配する。 .\"O If .\"O .I seconds .\"O is zero, no new .\"O .BR alarm () .\"O is scheduled. .I seconds がゼロならば、新たな .BR alarm () は手配されない。 .\"O In any event any previously set .\"O .BR alarm () .\"O is canceled. 今までに設定されていた .BR alarm () は中断される。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O .BR alarm () .\"O returns the number of seconds remaining until any previously scheduled .\"O alarm was due to be delivered, or zero if there was no previously .\"O scheduled alarm. .BR alarm () は以前に予定されていたアラームの配送までの残り時間を返す。以前に アラームが予定されていなければゼロを返す。 .\"O .SH "CONFORMING TO" .SH 準拠 SVr4, POSIX.1-2001, 4.3BSD. .\"O .SH NOTES .SH 注意 .\"O .BR alarm () .\"O and .\"O .BR setitimer (2) .\"O share the same timer; calls to one will interfere with use of the .\"O other. .BR alarm () と .BR setitimer (2) は同じタイマーを共有している; 片方を呼び出すことはもう一方の 使用に影響を与える。 .PP .\"O .BR sleep (3) .\"O may be implemented using .\"O .BR SIGALRM ; .\"O mixing calls to .\"O .BR alarm () .\"O and .\"O .BR sleep (3) .\"O is a bad idea. .BR sleep (3) は .B SIGALRM を利用して実装されているかもしれない。 .BR alarm () と .BR sleep (3) を混ぜて使用してはならない。 .\"O Scheduling delays can, as ever, cause the execution of the process to .\"O be delayed by an arbitrary amount of time. スケジューリング(scheduling)の遅延により、プロセスの実行に不定量の 遅延が起きる可能性がある。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR gettimeofday (2), .BR pause (2), .BR select (2), .BR setitimer (2), .BR sigaction (2), .BR signal (2), .BR sleep (3), .BR time (7)