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" ) {}
Name | Type | Required | Default | Description |
---|---|---|---|---|
variable | string | Yes | The name of the variable that will contain the value of the time taken. | |
label | string | No | The label for the stopwatch, used in debugging output. |
<cfstopwatch variable="stopwatchVar" label="Nap time">
Begin some long running process ...
<cfset sleep(2000)>
done.
</cfstopwatch><cfdump var="stopwatchVar">
cfstopwatch( variable="stopwatchVar", label = "Nap time" ){
writeoutput("Begin some long running process ... ");
sleep(2000);
}
writeDump( stopwatchVar );