[whatwg] Timeouts and monotonic vs clock time

Boris Zbarsky bzbarsky at MIT.EDU
Wed Nov 3 20:21:28 PDT 2010


On 11/3/10 11:01 PM, and-py wrote:
> * When moving the clock forward, Firefox (4) and Safari (5) act
> clock-based: they immediately fire any interval or timeout whose
> deadline has passed, and continue calling intervals at their period
> thereafter.

Curious.  Firefox 4 in fact uses a delay-like setup for timeouts (used 
to use a clock-based one in 3.6 and earlier)....

Though more precisely, I believe it uses a delay setup on Windows, 
clock_gettime(CLOCK_MONOTONIC) on Linux and Mac.

So which OS you're testing this on might matter.

In case it matters, intervals are implemented in Gecko as simply 
timeouts that reset themselves....

-Boris



More information about the whatwg mailing list