<cftimer>
Displays execution time for a specified section of CFML code.
Lucee displays the timing information along with any output produced by the timed code.
This tag must have a body.
This tag is also supported within <cfscript>
<cftimer
type=string
label=string
unit=string
variable=string
><!--- body ---></cftimer>
| Attribute | Description |
|---|---|
type
string, optional
|
edit
Default: debug |
label
string, optional
|
edit
Label to display with timing information. Default: " " |
unit
string, optional
|
edit
Base unit for the timing, valid values are:
Introduced: 6.0.0.98 |
variable
string, optional
|
edit
The name of the variable in which to save the timer execution time into. Introduced: 6.0.0.98 |
Examples
edit<cftimer label="Nap time" type="outline">
This case take run based upon time.
<cfset sleep(200)>
<b>Successfully Stopped.</b>
</cftimer>
See also
- Debugging
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)