Wrox Programmer Forums
|
BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers, 2nd Edition by Nicholas C Zakas; ISBN: 9780470227800
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2011, 11:34 AM
Registered User
 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old July 19th, 2011, 09:14 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

"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.
__________________
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 18 rock1233 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 November 14th, 2009 03:35 PM
CHAPTER 18 example not working also! diegoborgh BOOK: Beginning JavaServer Pages 0 May 26th, 2005 11:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.