I'm trying to create cf code that pauses for a specified amount of time for
each itteration of a loop. Ideally, I need a sleep function but CF does not
have one.
I have the following code
<cfscript>
function mywait(timeInSec)
{
CreateObject( "java", "java.lang.Thread" ).sleep( timeInSec * 1000
);
}
</cfscript>
which produces the message
Diagnostics = The selected method sleep was not found. Either there are no
methods with the specified method name and argument types, or the method sleep
is overloaded with arguments types that ColdFusion can't decipher reliably. If
this is a Java object and you verified that the method exists, you may need to
use the javacast function to reduce ambiguity.
Can anyone tell me what is wrong with the code or suggest a better solution?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1753
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54