-
Notifications
You must be signed in to change notification settings - Fork 1
Timer
Hyomoto edited this page Jun 13, 2021
·
17 revisions
Jump To | Go Back |
Arguments | Methods | Variables |
---|
Implements: Struct
Timer provides the difference between two times in your program, when it is started and when it is checked.
:create event
timer = new Timer( "$S second", 2 );
:step event
if ( timer.elapsed() >= 1000000 ) {
show_debug_message( timer );
timer.reset()
}
Output: "1 second" is displayed once every second.
Name | Type | Purpose |
---|---|---|
*format | string |
The display format, $H, $M and $S will be replaced with hours, minutes, and seconds |
Jump To | top |
reset | elapsed | toString |
---|
Returns: self
Name | Type | Purpose |
---|---|---|
None |
Resets the elapsed time to the current moment.
Returns: int
Name | Type | Purpose |
---|---|---|
None |
Returns the time elapsed between the start time and now, in microseconds.
Returns: string
Name | Type | Purpose |
---|---|---|
None |
Returns the elapsed time as a formatted StringTime-formatted string.
Jump To | top |
---|
Name | Type | Initial | Purpose |
---|---|---|---|
__Format | string |
"$S" | The format string to use to display the elapsed time |
__Start | int |
get_timer() | The time at which the timer was started |
Devon Mullane 2020