In comp.lang.javascript message <Xn********************@194.109.133.242>
, Fri, 26 Oct 2007 17:53:42, Evertjan. <ex**************@interxnl.net>
posted:
>
var milisecs = +new Date();
gives you the exact number of miliseconds since
var start = new Date(0); // 1 jan 1970 00:00:00:000 UTC
on the local machine.
Strictly, not quite exactly.
The number of milliseconds is incremented at an interval which may
average 54.9, 15.625, 10, or other number of milliseconds. Sometimes,
that matters.
And it's the number of milliseconds UT or GMT; UTC has Leap Seconds too.
Using (new Date()/1000)|0 will do for a bit over 30 years
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.