<?php // classe prestazioni codice by Stefano V.
class prestazioni
{
var $tempoinizio;
var $tempofinale;
var $tempototale;
function get_microtime()
{
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = doubleval($mtime[1]) + doubleval($mtime[0]);
return $mtime;
}
function start_time()
{
$this->tempoinizio = $this->get_microtime();
}
function stop_time()
{
$this->tempofinale = $this->get_microtime();
}
function write_time()
{
$inizio = $this->tempoinizio;
$fine = $this->tempofinale;
$tempototale = sprintf("%.4f", abs($inizio - $fine));
return $tempototale;
}
}
?>