The CreatorCon Call for Content is officially open! Get started here.

Set the waiting time in the script.

bonsai
Mega Sage

※This is the Paris version.

 

I'm using the script below to set the wait time.

However, this method seems to be CPU-intensive.
Does anyone know how to set an efficient wait time?
The script will be used in the job schedule.

function sleepe_timer() {

    sleepe(30000);

    function sleepe(a) {
        var startMsec = new Date();
        while (new Date() - startMsec < a);
    }
}
1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi

you can use gs.sleep(milliseconds). Please note that you can only use it in the global scope but not in a custom scope.

Kind regards
Maik

View solution in original post

5 REPLIES 5

VaranAwesomenow
Mega Sage

With flow designer in action, its best to implement wait / sleep using a flow logic instead of BR / gs.sleep and so on.