News for hackers. Stuff that matters.
Re:Start a timer via the url by rochoa on Friday February 08, 2013 @01:27PM (#5189310)
The timeLeft -= 1000 approach is not the best one because setTimeout doesn't guarantee when the next tick is gonna happen.

Just open the JS console and type:

  for (var i = 0; i < 1e7; i++) {}
You will block the JS execution and your next tick will happen when the loop finishes. Using new Date().getTime() should do the job.

Edited for formatting.

Re:Start a timer via the url by ajanuary on Friday February 08, 2013 @03:43PM (#5190013)
Scrolling in iOS also stops setTimeout being called.
Re:Start a timer via the url by juliangruber on Wednesday February 13, 2013 @05:23AM (#5212340)
I fixed that, thanks :)