par
yop » 16 juil. 2007, 17:56
function tjs_GetTempsTraitement($timer1)
{
$timer2 = microtime(); $timer2 = substr($timer2,strpos($timer2," ")) + substr($timer2,0,strpos($timer2," "));
$timer1 = substr($timer1,strpos($timer1," ")) + substr($timer1,0,strpos($timer1," "));
return round(($timer2-$timer1),5);
}
$SQLSearch='select * from table where '.$sql. 'order by date asc limit '.$limit1. ' , '.$limit2;
$ChronoStart = microtime();
$Query=mysql_query($SQLSearch,$nConnection);
$temps = tjs_GetTempsTraitement($ChronoStart);
echo $temps;
Moi j'ai ca pour le moment, mais je comprends pas pourquoi cette méthode ne calcule pas le temps d'execution du php?
[php]
function tjs_GetTempsTraitement($timer1)
{
$timer2 = microtime(); $timer2 = substr($timer2,strpos($timer2," ")) + substr($timer2,0,strpos($timer2," "));
$timer1 = substr($timer1,strpos($timer1," ")) + substr($timer1,0,strpos($timer1," "));
return round(($timer2-$timer1),5);
}
$SQLSearch='select * from table where '.$sql. 'order by date asc limit '.$limit1. ' , '.$limit2;
$ChronoStart = microtime();
$Query=mysql_query($SQLSearch,$nConnection);
$temps = tjs_GetTempsTraitement($ChronoStart);
echo $temps;
[/php]
Moi j'ai ca pour le moment, mais je comprends pas pourquoi cette méthode ne calcule pas le temps d'execution du php?