home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / gettickcount.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  614 b   |  25 lines

  1. <!--- This example calls the GetTickCount
  2.       function to track execution time --->
  3. <html>
  4. <head>
  5. <title>GetTickCount function</title>
  6. </head>
  7.  
  8. <body>
  9. <h3>GetTickCount function</h3>
  10. <!--- Setup timing test --->
  11. <CFSET iterationCount = 1000>
  12.  
  13. <!--- Time an empty loop with this many iterations --->
  14. <CFSET tickBegin = GetTickCount()>
  15. <CFLOOP Index=i From=1 To=#iterationCount#></CFLOOP>
  16. <CFSET tickEnd = GetTickCount()>
  17. <CFSET loopTime = tickEnd - tickBegin>
  18.  
  19. <!--- Report --->
  20. <p>
  21. <CFOUTPUT>Loop time (#iterationCount# iterations) was: #loopTime# milliseconds</CFOUTPUT>
  22.  
  23. </body>
  24. </html>
  25.