Date.prototype.getTime

P T Withington ptw at pobox.com
Wed Jun 28 03:10:34 PDT 2006


On 2006-06-27, at 23:32 EDT, Bob Ippolito wrote:

> Why not a (64-bit) float? Millisecond precision is pretty weak,  
> it'd be nicer to have higher precision where available and a float  
> is the only reasonable way to get it (since nanoseconds don't fit  
> well in a 32-bit integer).

My point exactly.  Even in an interpreter, 1ms is a looong time these  
days.  And floats are no longer expensive.

Adding something like Date.now() would make optimization easier for  
implementers (might translate to only a few instructions on a decent  
architecture, e.g., scale the cycle-count register by the system  
clock frequency).



More information about the Es4-discuss mailing list