cfsleep

Causes the current thread to sleep for the given number of milliseconds.

  <cfsleep time=ms>

 sleep(duration)

Attribute Reference

time numeric
Required

The number of milliseconds to sleep for.

Compatibility

BoxLang:

Version 1.0.0+ <bx:sleep> in BoxLang

Examples
Sample code using the cfsleep tag

Dump the current time using a loop, delay 2 seconds each iteration.

<cfloop index='i' from='1' to='3'>
  <cfdump var='#timeFormat(now(), "HH:mm:ss")#'/>
  <cfsleep time='2000'/>
</cfloop>

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

Fork me on GitHub