-
Notifications
You must be signed in to change notification settings - Fork 1
Timer
Hyomoto edited this page Oct 18, 2020
·
17 revisions
Jump To | Go Back |
Arguments | Methods | Variables |
---|
Implements: None
Timer provides the difference between two times in your program, when it is created and when it is checked. It can be used to get the elapsed time or as a formatted string.
var _timer = new Timer( "$S seconds", 2 );
if ( _timer.elapsed() > 100000 ) {
show_debug_message( string( _timer ) );
}
Name | Type | Purpose |
---|---|---|
format | string |
The display format, $H, $M and $S will be replaced with hours, minutes, and seconds |
decimals | int |
How many decimals each time unit should contain |
Jump To | top |
reset | elapsed | toString | is |
---|
Returns: N/A undefined
Name | Type | Purpose |
---|---|---|
None |
Resets the elapsed time to the current moment.
Returns: int (0..
)
Name | Type | Purpose |
---|---|---|
None |
Returns the time elapsed between the start time and now, in microseconds.
Returns: string ("string"
)
Name | Type | Purpose |
---|---|---|
None |
Returns the elapsed time as a formatted StringTime-formatted string.
Returns: boolean (true
or false
)
Name | Type | Purpose |
---|---|---|
type | `` | : "Constructor", desc : "The Constructor to compare this against.", name : "type" } |
Returns true
if the provided type is Timer.
Jump To | top |
---|
- content - the internal StringTime that is used to format the elapsed time
- start - the moment the timer was last started, either when it was created or the last reset()
Devon Mullane 2020