Static
defaultIf set, then classes implementing the IClockChild interface should automatically add themselves to the default clock.
List of objects that get updated by the clock each update cycle. It is strongly recommended not to add children directly through this list
How many milliseconds from one tick to the next.
Please note that the clock will not necessarily update exactly as often as defined here, but it should be pretty close.
Returns whether the clock is already running.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
Add a new object to receive clock updates to the end of the list. Returns the object that was added. This function is the same as addChildToEnd
Add a new object to receive clock updates to the start of the list. Returns the object that was added.
Add a new object to receive clock updates, positioned so it gets updates before the referenced object.
Returns the added child object.
The object to be added to the update list
The object for the child to be added in front of. The function will throw an error if this element can't be found
Add a new object to receive clock updates to the end of the list. Returns the object that was added.
Calls the finish() method of all children which meet the passed in filter criteria.
Accepts a function which takes in an IClockChild, and returns a boolean, signifying whether the passed in IClockChild should be stopped.
Generated using TypeDoc
The Clock class is the basis on which many other classes throughout the shimi library rely upon to receive frequent and regular updates.
The clock contains a list of references to objects that implement IClockChild. Each time the clock receives an update, it forwards the message to all of its children.