#
Class: Timer#
HierarchyHandle<timer>
↳ Timer
#
Constructors#
constructornew Timer(): Timer
Returns: Timer
Defined in: handles/timer.ts:5
#
Properties#
handle• Readonly
handle: timer
Defined in: handles/handle.ts:6
#
Accessors#
elapsedelapsed(): number
Returns: number
Defined in: handles/timer.ts:14
#
idid(): number
Get the unique ID of the handle. The ID is recycled once you destroy the object.
Returns: number
The unique ID of a handle object.
Defined in: handles/handle.ts:18
#
remainingremaining(): number
bug
This might not return the correct value if the timer was paused and restarted at one point. See http://www.wc3c.net/showthread.php?t=95756.
Returns: number
Defined in: handles/timer.ts:21
#
timeouttimeout(): number
Returns: number
Defined in: handles/timer.ts:25
#
Methods#
destroydestroy(): Timer
Returns: Timer
Defined in: handles/timer.ts:29
#
pausepause(): Timer
Returns: Timer
Defined in: handles/timer.ts:34
#
resumeresume(): Timer
Returns: Timer
Defined in: handles/timer.ts:39
#
startstart(timeout: number, periodic: boolean, handlerFunc: function): Timer
#
Parameters:Name | Type |
---|---|
timeout | number |
periodic | boolean |
handlerFunc | () => void |
Returns: Timer
Defined in: handles/timer.ts:44
#
fromExpiredstatic fromExpired(): Timer
bug
Might crash the game if called when there is no expired timer.
Returns: Timer
Defined in: handles/timer.ts:52
#
fromHandlestatic fromHandle(handle: timer): Timer
#
Parameters:Name | Type |
---|---|
handle | timer |
Returns: Timer
Defined in: handles/timer.ts:56