X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs Date: Mon, 12 Jul 1999 13:40:28 +0200 (MET DST) From: Hans-Bernhard Broeker X-Sender: broeker AT acp3bf To: djgpp-workers AT delorie DOT com Subject: Re: setitimer and getitimer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 12 Jul 1999, Eli Zaretskii wrote: > It seems that our implementation gets wrong the value returned by > getitimer and setitimer (the latter in the ovalue argument). We > return the *remaining* time until the timer expires, whereas the > Unix semantics seems to be to return the *original* timer value > passed to setitimer last time it was called. I just looked it up on a Digital Unix Alpha box --- DEC is excellent at writing manpages, IMHO. To quote: ovalue Points to an itimerval structure whose members specify a current timer interval and the time left to the end of the interval. I.e. the 'ovalue->it_interval' is the same as was specified in the previous setitimer() call, and 'ovalue->it_value' is the remaining time until this timer fires. According to DEC, this is standardized not by POSIX, but by XPG4-UNIX. That's the X/Open group definition of Unix. Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.