Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Full time, including milliseconds

Status
Not open for further replies.

cl8855

Programmer
Nov 28, 2000
47
US
Is there any way to get the current time (including milliseconds) in cold fusion? Doesn't look like it in the date/time functions, but someone must be doing this.

thanks
 
getTickCount() will get the milliseconds it takes to do a process.

<cfset start = GetTickCount()>
do some stuff
<cfset end = getTickCount()>

<cfoutput>It took #evaluate(start-end)# milliseconds to do that</cfoutput>

thereptilian120x120.gif
 
I could be wrong here... but i believe mx is the first version where you could output direct evaluations.

<cfoutput>#start - end#</cfoutput><!--- MX compatible (I think) --->
<cfoutput>#evaluate(start-end)#</cfoutput> <!--- would work for any version (I think) --->

or

<cfset start = 5>
<cfset end = 1>
<cfset finish = start - end>
<cfoutput>#finish#</cfoutput>

Like i said I could be wrong. I remember reading about something like that new to mx.

thereptilian120x120.gif
 
<cfset start = 5>
<cfset end = 1>
<cfset finish = start - end>
<cfoutput>#finish#</cfoutput>

thats good in 5 or mx

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top