On Fri, Jan 14, 2011 at 9:09 AM, Peter van der Zee <[email protected]> wrote:
> On Fri, Jan 14, 2011 at 6:28 AM, foldi <[email protected]> wrote:
>>
>> I'm trying to understand something about setInterval. When running the
>> following in FF3, the time it takes to execute the interval's function
>> does not take longer than the 30ms specified for the interval.
>> However, it takes longer than 30ms to for the interval to run again.
>> Where is the extra time going? Is there always some overhead to
>> running a setInterval? Thanks.
>>
>
> Certain browsers have a minimal interval at which timers can be called. For
> example, firefox has 10ms intervals. So timers simply can't be called faster
> than ten times per second.
> I don't know for others (including fx4, maybe they changed it) but I'm sure
> somebody else has a table with these details somewhere :)
> - peter
>

Do you have a source for this?

I just wrote a quick test where setInterval is set to call my test
function every 4ms and the function just prints the time elapsed
between the last execution.
Also the average with firefox is slightly above 10ms, it occasionally
drops below (everything between 5 - 9). This is especially the case
for the first few executions.
So to me it seems there is no fixed timer, but on average it isn't
faster than 10ms. Or am I missing anything?

- Robin

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to