Supermoderator
|
|
Reg.datum: Jan 2003
Inlägg: 1 566
|
|
Supermoderator
Reg.datum: Jan 2003
Inlägg: 1 566
|
Jag brukar göra så här, något åt orreborres håll:
<?php
function fromMilliToSeconds($time_start, $time_slut) {
$t1 = explode(' ', $time_start);
$t2 = explode(' ', $time_slut);
$sec = $t2[1] - $t1[1];
$msec = $t2[0] - $t1[0];
$tid = round(($sec + $msec), 3);
return $tid;
}
$time_start = microtime();
// räkna vad-ni-vill
$time_slut = microtime();
$tid = fromMilliToSeconds($time_start, $time_slut);
echo $tid;
?>
Mvh, Tobias
__________________
www.cellsynt.com
|