Try using Date.now ()
The now () method returns the milliseconds that have passed since January 1, 1970 00:00:00 UTC so far as a number.
you can use this as a backup for older browsers
if (!Date.now) { Date.now = function now() { return +(new Date); }; }
source share