User Tools

Site Tools


timer_func

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: 2022/09/03 23:25 by 127.0.0.1

Exception: Git command failed to perform periodic pull: From https://github.com/RazorEnhanced/razorenhanced.github.io * branch main -> FETCH_HEAD error

Exception: Git command failed to perform periodic pull: From https://github.com/RazorEnhanced/razorenhanced.github.io * branch main -> FETCH_HEAD error

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the gitbacked plugin.

More info has been written to the DokuWiki error log.