Please Share Feedback


Questions, comments, suggestions? Let us know what you think on our Forum.

To contact us privately, please use our contact form.

Author: Elyse, PMP, CPHIMS
July 24, 2004


Here is a simple little sleep UDF. Hope it helps out.

<cffunction name="sleep" access="public" returntype="numeric">
<cfargument name="timePeriod" type="numeric" required="true" hint="The time in seconds you want the program to wait" />
<cfset var sleepTime = JavaCast("int", timePeriod * 1000) />
<cfset var objThread = createObject('java', 'java.lang.Thread') />
<cfset objThread.sleep(sleepTime) />
<cfreturn sleepTime>
</cffunction>

Subscribe and Share!

Did you enjoy this article? Your feedback is very important! I'd like to invite you to keep up to date with the latest posts from Anticlue. We offer several venues. If you have some questions, help can be found here.
 

0 Comments to “Wait a bit CF”


« What are design patterns Evaluating an idea »

Please share your thoughts and suggestions