sleep Function

Pauses the execution of the current thread for the specified number of milliseconds.


int sleep(int _duration)

Parameter

Description

_duration

The number of milliseconds to pause.

The number of milliseconds that the thread actually paused.

static void sleepExample(Args _arg)
{
    int seconds = 10;
    int i;
    ;
    i = sleep(seconds*1000);  
    print "job slept for " + int2str(i/1000) + " seconds";
    pause;
}

Community Additions

ADD
Show: