Return a function that can be called instead of callback, but guarantees a limited execution rate. The execution rate is calculated based on the runtime duration of the previous call. Example:
callback
throttledFoo = util.adaptiveThrottle(foo.bind(this), {});throttledFoo();throttledFoo(); Copy
throttledFoo = util.adaptiveThrottle(foo.bind(this), {});throttledFoo();throttledFoo();
Rest
Return a function that can be called instead of
callback
, but guarantees a limited execution rate. The execution rate is calculated based on the runtime duration of the previous call. Example: