setitimer.c revision 1.1.1.1.6.2
1/* $NetBSD: setitimer.c,v 1.1.1.1.6.2 2011/01/09 20:42:48 riz Exp $ */ 2 3#ifndef LINT 4static const char rcsid[] = "Id: setitimer.c,v 1.2 2005/04/27 04:56:12 sra Exp"; 5#endif 6 7#include "port_before.h" 8 9#include <sys/time.h> 10 11#include "port_after.h" 12 13/*% 14 * Setitimer emulation routine. 15 */ 16#ifndef NEED_SETITIMER 17int __bindcompat_setitimer; 18#else 19 20int 21__setitimer(int which, const struct itimerval *value, 22 struct itimerval *ovalue) 23{ 24 if (alarm(value->it_value.tv_sec) >= 0) 25 return (0); 26 else 27 return (-1); 28} 29#endif 30 31/*! \file */ 32