π
π
π
π
cedoscript
Searchβ¦
Introduction
Documentation
Packets
Examples
api
Events
Settings
Objects
EntityLivingBase
Color
TimerUtil
Drag
Bindings
Client
Module Manager
Player
Packet
Notification
Render
Font
User
World
Powered By
GitBook
TimerUtil
This is a timer utility that allows to keep track of time and run certain code on a specified interval
Creation
1
var
timerUtil
=
client
.
createTimer
()
Copied!
Returns a
TimerUtil
object.
Functions
getTime
1
timerUtil.getTime()
Copied!
Returns the current time of the timer as a
Number
reset
1
timerUtil.reset()
Copied!
This will reset the time elapsed
hasTimeElapsed
1
timerUtil
.
hasTimeElapsed
(
1000
)
2
β
3
//or
4
β
5
timerUtil
.
hasTimeElapsed
(
1000
,
true
)
Copied!
Returns true if the timer has elapsed the specified time
Parameter
Type
Description
time
Number
The time elapsed to check in milliseconds
reset (Optional)
Boolean
Set to true if you want to reset the time elapsed if the method returned true
Previous
Color
Next
Drag
Last modified
8mo ago
Copy link
Contents
Creation
Functions
getTime
reset
hasTimeElapsed