<?php
/*******************************************************************************
Package : Processing - An simple way to display processing code time
File : main class
Author: José Augusto Ferreira Franco
Nick name : Guto Ferreira
Web : www.revista-php.net
Build date: 27- January 2008
Version : 1.0
Lisence : Artist License (means you must leave this header always)
********************************************************************************/
class Processing{
function __construct(){
// constructor vazio
}
// obtem o tempo inicial em segundos
public function Start_Time(){
return time()+ microtime();
}
// obtem o tempo final em segundos
public function End_Time(){
return time()+ microtime();
}
// calcula o tempo de processamento
public function Total_Time($ini_t,$end_t){
return round($end_t - $ini_t,4);
}
//apresenta a mensagem com o tempo decorrido
public function show_msg($time){
echo "Page generated in $time seconds !";
}
}
?>