-
Notifications
You must be signed in to change notification settings - Fork 1
Timer
Hyomoto edited this page Oct 12, 2020
·
17 revisions
Jump To | Go Back |
Arguments | Methods | Variables |
---|
Includes: String()
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 | integer | How many decimals each time should contain |
Jump To | top |
reset | elapsed | toString | is |
---|
Returns: N/A (undefined
)
Name | Type | Purpose |
---|---|---|
Resets the elapsed time to the current moment.
Returns: integer (0..
)
Name | Type | Purpose |
---|---|---|
Returns the time elapsed between the start time and now, in microseconds.
Returns: N/A (undefined
)
Name | Type | Purpose |
---|---|---|
Returns the elapsed time as a formatted StringTime.
Returns: boolean (true
or false
)
Name | Type | Purpose |
---|---|---|
type | struct id | The structure type to compare this against |
Returns true
if the provided type is Timer.
Jump To | top |
---|
- start - the moment the timer was last started, either when it was created or the last reset()
- text - the internal StringTime that is used to format the elapsed time
Devon Mullane 2020