Measures the time taken, in milliseconds, for the code between the start tag and end tag to execute.
<cfstopwatch variable="time" label="timer"></cfstopwatch>
cfstopwatch( variable="time" label="timer" ) {}
<cfstopwatch variable="stopwatchVar" label="Nap time">
Begin some long running process ...
<cfset sleep(2000)>
done.
</cfstopwatch><cfdump var="stopwatchVar">
Expected Result: The time elapsed while executing the code inside the <cfstopwatch> block is returned as a variable then displayed below.
cfstopwatch( variable="stopwatchVar", label = "Nap time" ){
writeoutput("Begin some long running process ... ");
sleep(2000);
}
writeDump( stopwatchVar );
Expected Result: The time elapsed while executing the code inside the <cfstopwatch> block is returned as a variable then displayed below.
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.