Two setInterval duplications

RESOLVED DUPLICATE of bug 234016

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 234016
12 years ago
12 years ago

People

(Reporter: Ivan Shumkov, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

Two calls setInterval function produced duplicate callback calls

Reproducible: Always

Steps to Reproduce:
1. call two setInterval
2. view result
Actual Results:  
four callback calls

Expected Results:  
two callback calls
No problem here, two messages logged every second as I'd expect.

Tested on 1.5.0.6 and current Minefield.

Comment 2

12 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

After the first few seconds (where it works correctly), I see four simultaneous calls every two seconds - so it's the correct rate (average two per second), but not spread out correctly. Changing the test case to say:

    setInterval(function(h){log('interval 1 ('+h+' ms late)')}, 1000)
    setInterval(function(h){log('interval 2 ('+h+' ms late)')}, 1000)

results in:

Fri Aug 11 2006 12:59:26 GMT+0100 (GMT Daylight Time)interval 1 (31 ms late)
Fri Aug 11 2006 12:59:26 GMT+0100 (GMT Daylight Time)interval 2 (31 ms late)
Fri Aug 11 2006 12:59:26 GMT+0100 (GMT Daylight Time)interval 1 (-968 ms late)
Fri Aug 11 2006 12:59:26 GMT+0100 (GMT Daylight Time)interval 2 (-968 ms late)
Fri Aug 11 2006 12:59:28 GMT+0100 (GMT Daylight Time)interval 1 (15 ms late)
Fri Aug 11 2006 12:59:28 GMT+0100 (GMT Daylight Time)interval 2 (15 ms late)
Fri Aug 11 2006 12:59:28 GMT+0100 (GMT Daylight Time)interval 1 (-984 ms late)
Fri Aug 11 2006 12:59:28 GMT+0100 (GMT Daylight Time)interval 2 (-984 ms late)

which agrees that half of the callbacks are occurring a second too early, which is far from expected behaviour.
This appears to be bug 234016

*** This bug has been marked as a duplicate of 234016 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.