home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
src
/
sys
/
c
/
alarm
next >
Wrap
Text File
|
1994-03-08
|
564b
|
38 lines
static char sccs_id[] = "@(#) alarm.c 1.0 " __DATE__ " HJR";
/* alarm.c (c) Copyright 1990 H.Rogers */
#include <errno.h>
#include <time.h>
#include "sys/types.h"
#include "sys/unix.h"
#include "sys/syslib.h"
#include "sys/os.h"
time_t
alarm (register time_t t)
{
int r[10];
time_t o;
if (o = __u->alarm)
{
r[0] = (int) __h_sigalrm;
r[1] = 0;
os_swi (0x3d, r);
}
__u->alarm = t;
if (t > 0)
{
r[0] = (int) (t * 100);
r[1] = (int) __h_sigalrm;
r[2] = 0;
os_swi (0x3b, r);
}
return (o);
}