Provides helpful utility functions for working with Timestamp objects.
Timestamp
Synchronizer
public static function add(timestampA:Timestamp, timestampB:Timestamp):Timestamp
Adds the two timestamps and returns a new one that is the sum of the two times.
Parameters
Returns
| Timestamp —
the sum of timestampA and timestampB
|
public static function framesToMilliseconds(frames:int):int
Convert frames to milliseconds based on the framerate of the Synchronizer.
Parameters
| frames:int — - the number in frames to convert
|
Returns
| int — the result in milliseconds
|
See also
public static function getTimestampFromFrames(frames:int):TimestampParameters
Returns
public static function getTimestampFromMilliseconds(milliseconds:int):TimestampParameters
Returns
public static function millisecondsToFrames(milliseconds:int):int
Convert milliseconds to frames based on the framerate of the Synchronizer.
Parameters
| milliseconds:int — - the number in milliseconds to convert
|
Returns
| int — the result rounded to the nearest frame
|
See also
public static function subtract(timestampA:Timestamp, timestampB:Timestamp):Timestamp
Subtracts timestampB from timestampA and returns the difference of the two times.
Parameters
| timestampA:Timestamp — - the timstamp to subtract from.
|
| |
| timestampB:Timestamp — - the ammount of time to subtract from timestampA.
|
Returns
| Timestamp —
the difference between timestampA and timestampB
|