Package | weavejs.core |
Class | public class Scheduler |
Inheritance | Scheduler ![]() |
Implements | IScheduler, IDisposableObject |
Property | Defined By | ||
---|---|---|---|
averageFrameTime : int = 0 | Scheduler | ||
currentFrameElapsedTime : int [read-only] | Scheduler | ||
debug_async_stack_elapsed : Boolean = false [static] | Scheduler | ||
debug_async_time : Boolean = false [static] | Scheduler | ||
debug_callLater : Boolean = false [static] | Scheduler | ||
debug_delayTasks : Boolean = false [static] | Scheduler | ||
debug_fps : Boolean = false [static] | Scheduler | ||
debug_visibility : Boolean = false [static] | Scheduler | ||
frameCallbacks : ICallbackCollection [read-only] | Scheduler | ||
maxComputationTimePerFrame : uint = 100
When the current frame elapsed time reaches this threshold, callLater processing will be done in later frames. | Scheduler | ||
previousFrameElapsedTime : int [read-only] | Scheduler |
Method | Defined By | ||
---|---|---|---|
Scheduler | |||
callLater(relevantContext:Object, method:Function, parameters:Array = null):void | Scheduler | ||
debugTime(str:String):int [static] | Scheduler | ||
dispose():void | Scheduler | ||
generateCompoundIterativeTask(... iterativeTasks):Function [static]
This will generate an iterative task function that is the combination of a list of tasks to be completed in order. | Scheduler | ||
This gets the maximum milliseconds spent per frame performing asynchronous tasks. | Scheduler | ||
getTaskPriorityTimeAllocation(priority:uint):uint
This will get the time allocation for a specific task priority. | Scheduler | ||
setMaxComputationTimePerFrame(value:uint):void
This sets the maximum milliseconds spent per frame performing asynchronous tasks. | Scheduler | ||
setTaskPriorityTimeAllocation(priority:uint, milliseconds:uint):void
This will set the time allocation for a specific task priority. | Scheduler | ||
startTask(relevantContext:Object, iterativeTask:Function, priority:uint, finalCallback:Function = null, description:String = null):void | Scheduler |
averageFrameTime | property |
public var averageFrameTime:int = 0
currentFrameElapsedTime | property |
currentFrameElapsedTime:int
[read-only] public function get currentFrameElapsedTime():int
debug_async_stack_elapsed | property |
public static var debug_async_stack_elapsed:Boolean = false
debug_async_time | property |
public static var debug_async_time:Boolean = false
debug_callLater | property |
public static var debug_callLater:Boolean = false
debug_delayTasks | property |
public static var debug_delayTasks:Boolean = false
debug_fps | property |
public static var debug_fps:Boolean = false
debug_visibility | property |
public static var debug_visibility:Boolean = false
frameCallbacks | property |
frameCallbacks:ICallbackCollection
[read-only] public function get frameCallbacks():ICallbackCollection
maxComputationTimePerFrame | property |
public var maxComputationTimePerFrame:uint = 100
When the current frame elapsed time reaches this threshold, callLater processing will be done in later frames.
previousFrameElapsedTime | property |
previousFrameElapsedTime:int
[read-only] public function get previousFrameElapsedTime():int
Scheduler | () | Constructor |
public function Scheduler()
callLater | () | method |
public function callLater(relevantContext:Object, method:Function, parameters:Array = null):void
Parameters
relevantContext:Object | |
method:Function | |
parameters:Array (default = null )
|
debugTime | () | method |
public static function debugTime(str:String):int
Parameters
str:String |
int |
dispose | () | method |
public function dispose():void
generateCompoundIterativeTask | () | method |
public static function generateCompoundIterativeTask(... iterativeTasks):Function
This will generate an iterative task function that is the combination of a list of tasks to be completed in order.
Parameters
... iterativeTasks — An Array of iterative task functions.
|
Function — A single iterative task function that invokes the other tasks to completion in order.
The function will accept a stopTime:int parameter which when set to -1 will
reset the task counter to zero so the compound task will start from the first task again.
|
See also
getMaxComputationTimePerFrame | () | method |
public function getMaxComputationTimePerFrame():uint
This gets the maximum milliseconds spent per frame performing asynchronous tasks.
Returnsuint |
getTaskPriorityTimeAllocation | () | method |
public function getTaskPriorityTimeAllocation(priority:uint):uint
This will get the time allocation for a specific task priority.
Parameters
priority:uint — The task priority defined by one of the constants in WeaveAPI.
|
uint — The time allocation for the specified task priority.
|
setMaxComputationTimePerFrame | () | method |
public function setMaxComputationTimePerFrame(value:uint):void
This sets the maximum milliseconds spent per frame performing asynchronous tasks.
Parameters
value:uint — new value.
|
setTaskPriorityTimeAllocation | () | method |
public function setTaskPriorityTimeAllocation(priority:uint, milliseconds:uint):void
This will set the time allocation for a specific task priority.
Parameters
priority:uint — The task priority defined by one of the constants in WeaveAPI.
| |
milliseconds:uint — The new time allocation for the specified task priority.
|
startTask | () | method |
public function startTask(relevantContext:Object, iterativeTask:Function, priority:uint, finalCallback:Function = null, description:String = null):void
Parameters
relevantContext:Object | |
iterativeTask:Function | |
priority:uint | |
finalCallback:Function (default = null )
| |
description:String (default = null )
|