Class: Timer#
Hierarchy#
Handle<timer>
↳ Timer
Constructors#
constructor#
new Timer(): TimerReturns: Timer
Defined in: handles/timer.ts:5
Properties#
handle#
• Readonly handle: timer
Defined in: handles/handle.ts:6
Accessors#
elapsed#
elapsed(): numberReturns: number
Defined in: handles/timer.ts:14
id#
id(): numberGet 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
remaining#
remaining(): numberbug 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
timeout#
timeout(): numberReturns: number
Defined in: handles/timer.ts:25
Methods#
destroy#
destroy(): TimerReturns: Timer
Defined in: handles/timer.ts:29
pause#
pause(): TimerReturns: Timer
Defined in: handles/timer.ts:34
resume#
resume(): TimerReturns: Timer
Defined in: handles/timer.ts:39
start#
start(timeout: number, periodic: boolean, handlerFunc: function): TimerParameters:#
| Name | Type |
|---|---|
timeout | number |
periodic | boolean |
handlerFunc | () => void |
Returns: Timer
Defined in: handles/timer.ts:44
fromExpired#
static fromExpired(): Timerbug Might crash the game if called when there is no expired timer.
Returns: Timer
Defined in: handles/timer.ts:52
fromHandle#
static fromHandle(handle: timer): TimerParameters:#
| Name | Type |
|---|---|
handle | timer |
Returns: Timer
Defined in: handles/timer.ts:56