sleep

Causes the current thread to stop processing for a specified period of time.

sleep(duration) → returns void

Argument Reference

duration numeric
Required

Time, in milliseconds, to stop processing the current thread

Examples
Sample code invoking the sleep function

Outputs the current date/time, sleeps for 5 seconds, then outputs the current date/time again.

<cfscript>
    writeOutput(now());
    writeOutput("<br />");
    sleep(5000);
    writeOutput(now());
</cfscript>

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub