gosmith at adobe.com
Wed Jun 28 15:07:58 PDT 2006
Regarding the suggestion that an int be used to represent the number of
milliseconds since 1970...
There have been approximately one trillion milliseconds since then, and
an int can't store more than about 2 billion. Aren't
milliseconds-since-the-epoch represented as a float not because this
number can or should be fractional but because a float can store
integers up to 2^52 (2^53?) or so rather than 2^31?
From: es4-discuss-admin at mozilla.org
[mailto:es4-discuss-admin at mozilla.org] On Behalf Of Neil Mix
Sent: Wednesday, June 28, 2006 2:23 PM
To: Brendan Eich
Cc: P T Withington; Peter Hall; Bob Ippolito; Jeff Walden;
es4-discuss at mozilla.org
Subject: Re: Date.prototype.getTime
On Jun 28, 2006, at 4:14 PM, Brendan Eich wrote:
>> From the size of integers and the scale, you can determine the
>> maximum interval you can measure, use modular arithmetic, and use
>> Date to compensate if you really need that granularity for a
>> longer interval (I believe such applications will be rare).
> There's a race if you don't have an atomic sample of the coarser
> and the finer unit clocks.
Maybe there could be a corresponding tickEpoch (a Date object) that
represents the time when Date.tick was set to 0?
Es4-discuss mailing list
Es4-discuss at mozilla.org
More information about the Es4-discuss