Class: scheduleManager

lime.scheduleManager

new lime.scheduleManager()

Unified timer provider class Don't create instances of this class. Used the shared instance.
This:
Source:

Summary

Classes
Task
Scheduled task
Members
<static> USE_ANIMATION_FRAME :boolean
Whether to use requestAnimationFrame instead of timer events Exposed here so it could be disabled if needed.
Methods
<private, static> activate_()
Start the internal timer functions
<private, static> animationFrameHandler_()
Webkit implemtation of requestAnimationFrame handler.
<private, static> beforePaintHandler_()
Mozilla < 11 implementation of requestAnimationFrame handler.
<static> callAfter(f, context, delay)
Set up function to be called once after a delay
<static> changeDirectorActivity(director, value)
Change director's activity. Used for pausing updates when director is paused
<private, static> disable_()
Stop interval timer functions
<private, static> dispatch_(delta)
Call all scheduled tasks
<static> getDisplayRate() → {number}
Returns maximum fire rate in ms. If you need FPS then use 1000/x
<static> schedule(f, context, opt_task)
Schedule a function. Passed function will be called on every frame with delta time from last run time
<static> scheduleWithDelay(f, context, delay, opt_limit)
Set up function to be called repeatedly after a delay
<static> setDisplayRate(value)
Sets maximum fire rate for the scheduler in ms. If you have FPS then send 1000/x Note that if animation frame methods are used browser chooses max display rate and this value has no effect.
<private, static> stepTimer_()
Timer events step function that delegates to other objects waiting
<static> unschedule(f, context)
Unschedule a function. For functions that have be previously scheduled

Classes

lime.scheduleManager.Task

Members

<static> USE_ANIMATION_FRAME :boolean

Whether to use requestAnimationFrame instead of timer events Exposed here so it could be disabled if needed.
Source:

Methods

<private, static> activate_()

Start the internal timer functions
This:
Source:

<private, static> animationFrameHandler_()

Webkit implemtation of requestAnimationFrame handler.
This:
Source:

<private, static> beforePaintHandler_()

Mozilla < 11 implementation of requestAnimationFrame handler.
This:
Source:

<static> callAfter(f, context, delay)

Set up function to be called once after a delay
Parameters:
Name Type Description
f function Function to be called.
context Object Context used when calling object.
delay number Delay before calling.
Source:

<static> changeDirectorActivity(director, value)

Change director's activity. Used for pausing updates when director is paused
This:
Parameters:
Name Type Description
director lime.Director Director.
value boolean Active or inactive?
Source:

<private, static> disable_()

Stop interval timer functions
This:
Source:

<private, static> dispatch_(delta)

Call all scheduled tasks
This:
Parameters:
Name Type Description
delta number Milliseconds since last run.
Source:

<static> getDisplayRate() → {number}

Returns maximum fire rate in ms. If you need FPS then use 1000/x
This:
Source:
Returns:
Display rate.
Type
number

<static> schedule(f, context, opt_task)

Schedule a function. Passed function will be called on every frame with delta time from last run time
This:
Parameters:
Name Type Argument Description
f function Function to be called.
context Object The context used when calling function.
opt_task lime.scheduleManager.Task <optional>
Task object.
Source:

<static> scheduleWithDelay(f, context, delay, opt_limit)

Set up function to be called repeatedly after a delay
This:
Parameters:
Name Type Argument Description
f function Function to be called.
context Object Context used when calling object.
delay number Delay before calling.
opt_limit number <optional>
Number of times to call.
Source:

<static> setDisplayRate(value)

Sets maximum fire rate for the scheduler in ms. If you have FPS then send 1000/x Note that if animation frame methods are used browser chooses max display rate and this value has no effect.
This:
Parameters:
Name Type Description
value number New display rate.
Source:

<private, static> stepTimer_()

Timer events step function that delegates to other objects waiting
This:
Source:

<static> unschedule(f, context)

Unschedule a function. For functions that have be previously scheduled
This:
Parameters:
Name Type Description
f function Function to be unscheduled.
context Object Context used when scheduling.
Source: