Subject: Re: POSIX timer_settime() dosn't set timer in some cases (lost
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-kern
Date: 09/02/2004 11:37:20
On Thu, 2 Sep 2004, Nathan J. Williams wrote:

> Frederick Bruckman <fredb@immanent.net> writes:
>
>> Well, I'm running X and listening to streaming audio with this...
>
> I'm a little dubious about this, because there are a bunch of uses of
> TIMESPEC_TO_TIMEVAL(), most of which don't seem to care about whether
> the value being zero. I think that property is specific to
> timer_settime().

It's not just that it could be zero. In general, when you set a timer 
to an interval, you expect it to go off sometime *after* the interval 
expires, never before. That it can ever go off before is an artifact 
of the incomplete transition from timevals to timespecs. There are a 
indeed a lot of instances, and I haven't looked at them all. Perhaps 
we should have two macros, but on the assumption that the conversion 
is done mainly to set a timer, I suggest the default should be to 
round up.


Frederick