This plugin allows you to sleep in HSL (sleep-background(seconds)
) while suspending the thread execution. The only garantee is that the thread will sleep at least x seconds before the thread is re-scheduled.
Follow the instructions in our manual to add our package repository and then run the below command.
apt-get install halon-extras-sleep-background
yum install halon-extras-sleep-background
These functions needs to be imported from the extras://sleep-background
module path.
Sleep at least x seconds.
Params
- seconds
number
- Time to sleep in seconds
Returns
Returns the actual time slept.
Example
import { sleep_background } from "extras://sleep-background";
echo sleep_background(3.0);