GetTickCount

Description

Determines the differences between the results of GetTickCount at successive points of page processing.

Return value

An integer value

Category

Date and time functions

Syntax

GetTickCount() 

Usage

This function is useful for timing CFML code segments or other page processing elements.

Example

<!--- Setup timing test --->
<cfset iterationCount = 1000>
<!--- Time an empty loop with this many iterations --->
<cfset tickBegin = GetTickCount()>
<cfloop Index = i From = 1 To = #iterationCount#></cfloop>
<cfset tickEnd = GetTickCount()>
<cfset loopTime = tickEnd - tickBegin>

<!--- Report --->
<cfoutput>Loop time (#iterationCount# iterations) was: #loopTime#
   milliseconds</cfoutput>

Comments