📄 alarm.3
字号:
.\" SCCSID: @(#)alarm.3 2.1 3/10/87.TH alarm 3 .SH Namealarm \- schedule signal after specified time.SH Syntax.nf.B #include <unistd.h>.PP.B unsigned alarm(\fIseconds\fP).br.B unsigned \fIseconds\fP;.fi.SH Description.NXR "alarm subroutine (standard C)".NXR "subroutine" "executing at specified time".NXA "alarm subroutine (standard C)" "sleep subroutine (standard C)"The.PN alarmsubroutinecauses signal SIGALRM, see .MS signal 3 ,to be sent to the invoking processin a number of seconds given by the argument.Unless caught or ignored, the signal terminates the process..PPThe .PN alarm requests are not stacked. Successive calls reset the alarm clock.If the argument is 0, any .PN alarm request is canceled.Because of scheduling delays,resumption of execution of when the signal iscaught may be delayed an arbitrary amount.The longest specifiable delay time is 100000000 seconds. Values largerthan 100000000 will be silently rounded down to 100000000..PPThe return value is the amount of timepreviously remaining in the alarm clock..SH EnvironmentWhen your program is compiled using the System V environment,.PN alarmrounds up any positive fraction of a second to the next second. .PPWhen your program is compiled using the POSIX environment,.PN alarmtakes a parameter of type unsigned, and returns a value of typeunsigned..SH See Alsogetitimer(2), sigpause(2), sigvec(2), signal(3), sleep(3)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -