[Linux-Discussion] Re: hah :)

  • From: Nils Vogels <nivo@xxxxxxxxxxx>
  • To: linux-discussion@xxxxxxxxxxxxx
  • Date: Sat, 10 Feb 2001 18:25:50 +0100

On Fri, Feb 09, 2001 at 11:53:51PM -0800, bobbya wrote:
> 
> Hello,
> 
> I'm writing a C program that uses the time, specifically, the
> "gettimeofday" function that has the number of seconds since
> January 1, 1970.
> 
> I use a long to store the number of seconds. The only problem is that
> there are only 9 digits in a long, and in at least a couple of years,
> more than 9 digits will be needed.
> 
This is the Y2k equivalent for Unix .. when gettimeofday() exceeds 9
characters, many problems are suspected to fail .. The date is somewhere
around 2037 if I'm not wrong, which gives everyone a few years to have a look
at their sourcecode ;)

> Does anyone have a solution to this  problem?
> 

use a double ?

-- 
Whenever I am working with the Windows Registry I feel as I imagine an 
FBI Special Agent might feel when they have to look through a dump for
forensic evidence, something like 
"I went to law school to go through this garbage?"


=============================================================
Avenir Web's Linux Discussion List

List info: //www.freelists.org/cgi-bin/webpage?webpage_id=13
To unsubscribe: email linux-discussion-request@xxxxxxxxxxxxx
with 'unsubscribe' in the Subject line.

Administrative contact: weez@xxxxxxxxxxxxxx
=============================================================

Other related posts: