Subject: struct timeval
To: None <tech-kern@netbsd.org>
From: Frank Kardel <kardel@netbsd.org>
List: tech-kern
Date: 04/25/2006 08:34:39
Hi *,

while progressing on timecounters I tripped over

sys/time.h:

struct timeval {
         long    tv_sec;         /* seconds */
         long    tv_usec;        /* and microseconds */
};

A quick scan in the net gave that other systems
use time_t for tv_sec an suseconds_t for tv_usec.

I think this should be cleaned up when moving to
timecounters.

Currently amd64 defines time_t as int so there
seems to be some room for mismatches as usually one
expects tv_sec being assignable to a time_t type without
loss of precision.

So, the questions are:
	- How can this be unified without
	  causing binary compatibility headaches?
	- When do we officially switch to time_t being
	  a 64 bit quantity (2038 being not so far away :-))?

Frank