Subject: RE: Setitimer ?
To: 'tech-kern@netbsd.org' <tech-kern@netbsd.org>
From: Riaz Randeree <RiazR@cat.co.za>
List: tech-kern
Date: 03/11/1999 17:53:47
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------ =_NextPart_001_01BE6BD7.59DD3F70
Content-Type: text/plain

I'm sorry.

 > I have NetBSD 1.3.2 for i386, and the call to setitimer
fails with EINVAL. 
 > Looking at file: sys/kern/kern_time.c, 
 > a function itimerfix is called and if tv_sec > 100 000
000 (3/3/1973) it fails. 

That should have been my clue! 

While I was attempting to set a timer to go off at an
absolute time (ie number of seconds past 1970), the value
should have been the number of seconds away from the current
time!


------ =_NextPart_001_01BE6BD7.59DD3F70
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.0.1460.9">
<TITLE>RE: Setitimer ?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I'm sorry.</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&gt; I have NetBSD 1.3.2 for i386, and the call =
to setitimer fails with EINVAL. </FONT>
<BR><FONT SIZE=3D2>&nbsp;&gt; Looking at file: sys/kern/kern_time.c, =
</FONT>
<BR><FONT SIZE=3D2>&nbsp;&gt; a function itimerfix is called and if =
tv_sec &gt; 100 000 000 (3/3/1973) it fails. </FONT>
</P>

<P><FONT SIZE=3D2>That should have been my clue! </FONT>
</P>

<P><FONT SIZE=3D2>While I was attempting to set a timer to go off at an =
absolute time (ie number of seconds past 1970), the value should have =
been the number of seconds away from the current time!</FONT></P>

</BODY>
</HTML>
------ =_NextPart_001_01BE6BD7.59DD3F70--