timer_func
Table of Contents
Scripting - Timer control function
Timer Create
| Create a Named Timer | |
| Syntax | Timer.Create(string TimerName, int ms_timer ) |
| Description: | |
| Create a timer with the provided name that will expire in ms_timer time (in milliseconds) | |
| Returns | void |
| In Object: | Timer |
| Parameters: | none |
Example:
Timer.Create("Test", 5000)
|
|
Timer Check
| Get remaining time for a named timer | |
| Syntax | Timer.Remaining(string TimerName) |
| Description: | |
| Returns the milliseconds remaining for a timer | |
| Returns | int ms_time |
| In Object: | Timer |
| Parameters: | string TimerName |
Example:
Timer.Create("Test", 5000)
#
while Timer.Check("Test"):
remain = Timer.Remaining("Test")
Misc.SendMessage("TimeLeft: {}".format(remain))
Misc.Pause(500
|
|
| Check if a timer is expired or not | |
| Syntax | Timer.Check(string TimerName) |
| Description: | |
| Check if a timer object is expired or not, | |
| Returns | bool - True if not expired, false if expired |
| In Object: | Timer |
| Parameters: | string TimerName |
timer_func.txt · Last modified: 2025/02/25 22:20 by 127.0.0.1