cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/16/12:13:47

Date: Tue, 16 Nov 1999 09:24:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kev <co273 AT freenet DOT buffalo DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: time() frequency
In-Reply-To: <Pine.GSO.3.96.991115233743.22152A-100000@freenet.buffalo.edu>
Message-ID: <Pine.SUN.3.91.991116092106.6671D-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 Mon, 15 Nov 1999, Kev wrote:

> And If I take this code to a SPARC or a Linux box, It'll yield different
> results.

This will only happen if you do arithmetics on what time() returns.  This 
is precisely what Hans-Bernhard was trying to tell you NOT to do!

Instead, you should use library functions like ctime(), localtime() and 
difftime() to perform conversions and comparison of time values.  If you 
do that, your code will work on ANY platform.

- Raw text -


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