Brian Ferrigno asked:
> What would be the best way to dealy the execution of a cf
> tamplate by x amount of seconds?
Simplest way:
<CFSET Sleep=5>
<CFSET Start=GetTickCount()>
<CFTRY>
<CFLOCK SCOPE="SESSION" TIMEOUT="#Sleep#" TYPE="READONLY">
<CFLOCK SCOPE="SESSION" TIMEOUT="#Sleep#" TYPE="EXCLUSIVE">
</CFLOCK>
</CFLOCK>
<CFCATCH></CFCATCH>
</CFTRY>
<CFSET End=GetTickCount()>
<CFSET Elapsed=End-Start>
<CFOUTPUT>Elapsed: #Elapsed#ms</CFOUTPUT>
Of course, this will lock your entire session. Anything else trying to
obtain a lock in that sessionwill also be delayed.
-R
Rick Osborne
Certified Advanced ColdFusion 5 Developer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists