www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/26/06:12:18

Date: Wed, 26 May 1999 13:10:19 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Ronald Landheer <dlanor AT dds DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: srand() or time()
In-Reply-To: <v01540b00b3716032b943@[145.18.167.138]>
Message-ID: <Pine.SUN.3.91.990526130642.12179B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 26 May 1999, Ronald Landheer wrote:

> The reason I reported this, is because I thought it weird
> that errno should be nonzero after a call to time, which should, as far as
> I know, only take a look at a certain memory block in my computer, where
> the time is stored & updated every 18.2 parts of a second (the system
> timer).

`time' cannot be as simple as you seem to think.  For starters, it needs 
to support the different time zones, so it needs at least to look at the 
environment variable TZ.  DJGPP's version does much more than that, and 
uses a disk-based database for all the different timezone rules.

Perhaps you should look at the sources of `time' to appreciate how 
complicated it is.

- Raw text -


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