Subject: Re: settimeofday() versus interval tim{ers,ing}
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
List: tech-kern
Date: 10/08/1996 12:13:22
>> I know _I_'d certainly be annoyed if I requested a timer tick once a
>> second and then, according to gettimeofday(), actually got it every
>> 1.001 second, thereby slowly drifting with respect to second
>> boundaries.

> Well, then I gues you have to stop using any non real-time operating
> system at all.  [...can't rely on being awakened when you should be,
> may be later...]

Well, yes, you can't count on running when you are nominally awakened.
My point is that the awakenings must occur once a second - if I don't
run for .1 second after the nominal wakeup time, that's irrelevant (for
the purposes of this discussion) as long as it doesn't mean that all
further wakeups are delayed by .1 second as a result.

This really sounds like a job for a special device.  Ideally, one
should be able to have a file descriptor that produces input
periodically, when the time changes, as soon as gettimeofday()
surpasses some specified time...any mix of the above, actually.  (But
then, I'm a reactionary - I want everything moved back into the
filesystem.  Processes, timers, networking...I'm not entirely sure what
I'd do with signals.)

					der Mouse

		     01 EE 31 F6 BB 0C 34 36  00 F3 7C 5A C1 A0 67 1D