calculate length of function call

aitchon
Posts: 119
Joined: Mon Jan 22, 2007 10:30 am

calculate length of function call

Post by aitchon »

I want to time a function to see how long it takes to complete:

<$timestarted=(convert( 'now' , 'date' ))>
<functioncall>
<$timeended=(convert( 'now' , 'date' ))>
<$timeelapsed=($timeended-$timestarted)>

I assume that $timeelapsed will return the length in seconds. Is there any way that I can have it return how many milliseconds it took?
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

calculate length of function call

Post by jason112 »