Re: gdate integration
- From: Jeff Garzik <jgarzik pobox com>
- To: gtk-devel-list redhat com
- Subject: Re: gdate integration
- Date: Wed, 2 Dec 1998 11:38:49 -0500 (EST)
Aaron Digulla wrote:
> Well, that depends on what you use the date for. When you do a simulation
> of a galaxy, then a date in the range of 40bits (10 billion years is
> already outside of 32 bits, you'll need 34 if you want the sign). So I'd
> base a generic date class on a 48bit year, 24bit for the seconds in the
> year and then I need 50bits for the fractions of the second (upto 10^-15
> which seems the smallest possible amount of time). That means I need a 122
> bit number to store a time. Add one bit for the sign and one for the
> "invalid date" then the rest for the fraction (if someone comes up with an
> even more accurate method to measure time) and you have a 128bit date which
> can store any possible date/time.
If it were me, I would store each date/time component as a separate int,
so the compiler can optimize as best as it sees fit.
Functions would be available to pack dates into various structures and
forms. (as they are now)
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]