# GetTickCount

Returns a millisecond clock counter that can be used for timing sections of CFML code or any other aspects of page processing.

### Syntax

    GetTickCount()

### Usage

The absolute value of the counter has no meaning. Generate useful timing values by taking differences between the results of GetTickCount() at specified points during page processing.

### Examples

    <!--- This example calls the GetTickCount
          function to track execution time --->
    <HTML>
    <BODY>
    <!--- 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>

    </BODY>
    </HTML>