On Jan 14, 10:09 am, Peter van der Zee <jsment...@qfox.nl> wrote: > On Fri, Jan 14, 2011 at 6:28 AM, foldi <foldifoldi.vi...@gmail.com> 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 :)
I wrote this to measure it: http://jorgechamorro.com/cljs/097/ And I asked a similar question here, yesterday: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-January/029832.html In another message in that same thread there's a table with the current minimum timer durations on Macs. In short, the MTDs are either 4 or 10 ms, and only Opera allows timeouts of 1ms but not of 0ms. -- Jorge. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com