Location: PHPKode > scripts > phpBuildTime > phpbuildtime/phpbuildtime.class.php
<?php
/********************************************************************************
 *
 * phpBuildTime Class
 *
 * Discription :
 *
 * Tow times are taken, first at the beginning and
 * the second time at the end of the script.
 * Subsequently, the difference of the times is
 * determined and returned.
 *
 * @version 1.0 ( 15.01.2003 )
 * @author Georg Gasseling < hide@address.com >
 * @copyright licence GPL
 *
 ********************************************************************************/

class phpBuildTime
{

 /*
  * Constructor
  */

 function phpBuildTime() {
 }


 /*
  * GET_TIME Takes the Time
  * @return Time in seconds
  */

 function GET_TIME()
 {
    list($usec, $sec) = explode(" ",microtime());
    return ((float)$usec + (float)$sec);
 }


 /*
  * DIFF_TIME Determines the difference
  *
  * @param : $start_time, $end_time
  * @return difference of Time in seconds
  */

 function DIFF_TIME($start_time, $end_time)
 {
        $diff = $end_time - $start_time;
        return $diff;
 }

}
?>
Return current item: phpBuildTime