sleep Function

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

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

int sleep(int _duration)

Parameters

Parameter

Description

_duration

The number of milliseconds to pause.

Return Value

The number of milliseconds that the thread actually paused.

Example

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

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).