delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/12/07:43:30

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 <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: setitimer and getitimer
In-Reply-To: <Pine.SUN.3.91.990712134715.4966B-100000@is>
Message-ID: <Pine.LNX.3.93.990712132938.6896B-100000@acp3bf>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019