from JSC to all others: preciseTime global function ?

David Bruant bruant.d at gmail.com
Thu Aug 16 04:45:44 PDT 2012


What about high resolution time? 
http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html

David

Le 16/08/2012 13:42, Andrea Giammarchi a écrit :
> Quick one, since I have discovered this only recently via 
> Object.keys(this) in JSC ( JavaScriptCore )
>
> double <= preciseTime()
>
> returns a double number with seconds and microseconds, e.g.
>
> 12334556.123456
>
> is basically the same of doing (new Date / 1000) except the precision 
> is up to 1000000.
>
> in Java/Rhino, System.nanoTime() / 1000000000 would produce similar 
> result, but I found preciseTime() accurate enough but not as slow as 
> nanoTime historically is ( greedy in clocks )
>
> Is ES6 considering this function? I find hilarious that all JS 
> benchmarks out there are basically asking browsers to enable a Java 
> Applet in order to have better precision ( without considering that 
> both binding and callback are more expensive than any +new Date call )
>
> Thanks for any sort of answer.
>
> Best Regards,
>     Andrea Giammarchi
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120816/59f428ad/attachment.html>


More information about the es-discuss mailing list