<cfset startTime = getTickCount() />
your code block
<cfset endTime = getTickCount() />

<cfset total = endTime - startTime />

<cfoutput>
your code ran in #total# ms
</cfoutput>

* disclaimer - i -think- it's measured in ms... :)
** disclaimer part deux - in MX, you can just do <cfoutput>your code ran in 
#endTime - startTime# ms </cfoutput> (no need for the <cfset total ...>)

On 4/25/05, Damien McKenna <[EMAIL PROTECTED]> wrote:
> 
> Is there any way to time how long portions of code take? I've got a
> loop that seems to take forever and I want to see where the problem is.
> Thanks.
> 
> --
> Damien McKenna - Web Developer - [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> The Limu Company - http://www.thelimucompany.com/
> <http://www.thelimucompany.com/> - 407-804-1014
> #include <stdjoke.h>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204329
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to