The DelayedTask class provides a convenient way to "buffer" the execution of a method, performing setTimeout where a new timeout cancels the old timeout. When called, the task will wait the specified time period before executing. If durng that time period, the task is called again, the original call will be cancelled. This continues so that the function is only called a single time for each iteration.
This method is especially useful for things like detecting whether a user has finished typing in a text field. An example would be performing validation on a keypress. You can use this class to buffer the keypress events for a certain number of milliseconds, and perform only if they stop for that amount of time.
var task = new
Note that we are using a DelayedTask here to illustrate a point. The configuration