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: 2025/02/25 22:20 by 127.0.0.1

Exception: Git command failed to perform periodic pull: Warning: Permanently added 'github.com,140.82.114.4' (ECDSA) to the list of known hosts. From github.com:RazorEnhanced/razorenhanced.github.io * branch main -> FETCH_HEAD error: Your local changes to the following files would be overwritten by merge: doc/api/CUO.html doc/api/Gumps.html doc/api/Item.html doc/api/Items.html doc/api/Journal.html doc/api/Misc.html doc/api/Mobile.html doc/api/PacketLogger.html doc/api/Player.html doc/api/Spells.html doc/api/Target.html doc/api/Trade.html Please commit your changes or stash them before you merge. Aborting

Exception: Git command failed to perform periodic pull: Warning: Permanently added 'github.com,140.82.114.4' (ECDSA) to the list of known hosts. From github.com:RazorEnhanced/razorenhanced.github.io * branch main -> FETCH_HEAD error: Your local changes to the following files would be overwritten by merge: doc/api/CUO.html doc/api/Gumps.html doc/api/Item.html doc/api/Items.html doc/api/Journal.html doc/api/Misc.html doc/api/Mobile.html doc/api/PacketLogger.html doc/api/Player.html doc/api/Spells.html doc/api/Target.html doc/api/Trade.html Please commit your changes or stash them before you merge. Aborting

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.