p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800 (http://p2p.wrox.com/forumdisplay.php?f=475)
-   -   Chapter 18 Advanced Timers (http://p2p.wrox.com/showthread.php?t=84382)

dotnetPrimer July 17th, 2011 11:34 AM

Chapter 18 Advanced Timers
 
Hi Nicholas,

I got a little confused reading this section when I read through
"The downside to this regulation of repeating timers is twofold: (1) intervals may be skipped, and (2) intervals may be smaller than expected between multiple timer-code executions."

For the red quoted "intervals may be skipped", were you trying to say that the code snippet would be skipped (the code snippet would not be executed)?

From testing result, the code snippet is still being executed, immediately when the UI queue was idle.

To make sure I didn't get it in a wrong way, I showed up here left this boring question for you[:)].

thank you for reading through this message.

thanks,
sincere reader

nzakas July 19th, 2011 09:14 PM

"Intervals may be skipped" doesn't mean that the code in the example won't be executed. It means that if you're using intervals, they may not occur as frequently as you think based on what's already queued to be completed. A new interval will not be added to the queue if there is already one in the queue, and that may happen for any number of reasons.


All times are GMT -4. The time now is 12:00 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.