]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/lib/bind/bsd/setitimer.c
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / lib / bind / bsd / setitimer.c
1 #ifndef LINT
2 static const char rcsid[] = "$Id: setitimer.c,v 1.1.352.1 2005/04/27 05:00:44 sra Exp $";
3 #endif
4
5 #include "port_before.h"
6
7 #include <sys/time.h>
8
9 #include "port_after.h"
10
11 /*%
12  * Setitimer emulation routine.
13  */
14 #ifndef NEED_SETITIMER
15 int __bindcompat_setitimer;
16 #else
17
18 int
19 __setitimer(int which, const struct itimerval *value,
20             struct itimerval *ovalue)
21 {
22         if (alarm(value->it_value.tv_sec) >= 0)
23                 return (0);
24         else
25                 return (-1);
26 }
27 #endif
28
29 /*! \file */