alarm.3

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 51 行

3
51
字号
.\" 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 + =
减小字号Ctrl + -
显示快捷键?