cfsleep

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

  <cfsleep time=ms>

 sleep(duration)

This tag requires Lucee.  Not supported on Adobe ColdFusion, etc.

Attribute Reference

time numeric
Required

The number of milliseconds to sleep for.

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