Skip to content

Sleep

sleep {milliseconds}

Also searchable as: Sleep · delay · milliseconds

sleep pauses the script for the given number of milliseconds.

sleep and wait pause the script the same way; only the unit differs. wait counts in ticks of 50 ms (or whole seconds) and can add a random extra; sleep counts in milliseconds. Use sleep for pauses shorter than 50 ms or that are not a multiple of it.

Both stop at once when you press Stop, and neither uses CPU while it waits. Old advice to keep sleep short because it froze the EasyUO window does not apply: in EasyUO Reforged each script runs on its own thread.

set %start #SysTime
sleep 25
set %took #SysTime - %start
display ok Slept %took ms
halt

See also

Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.