mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
- edited init script so it will only look for specific file names. "index.html", "index.php", so on, instead of running glob() on "index.*". - moved internal timer to seperate exec file. git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@7 a5845835-ea0f-0410-a762-dd0bfe9bfde8
34 lines
571 B
PHP
34 lines
571 B
PHP
<?php
|
|
|
|
class speedometer {
|
|
|
|
/*
|
|
|
|
Class: Speedometer v0.1
|
|
Created to simplify script execution statistics...
|
|
|
|
*/
|
|
|
|
var $digits = 6;
|
|
|
|
var $start;
|
|
var $time;
|
|
|
|
function speedometer ($digits=false) {
|
|
if ( !empty($digits) ) $this->digits = $digits;
|
|
$this->start = $this->getmicrotime();
|
|
}
|
|
|
|
function end () {
|
|
$end = $this->getmicrotime();
|
|
return $this->time = number_format( ($end - $this->start), $this->digits);
|
|
}
|
|
|
|
function getmicrotime () {
|
|
list($usec, $sec) = explode(' ', microtime());
|
|
$r = floatval($usec) + floatval($sec);
|
|
return($r);
|
|
}
|
|
}
|
|
|
|
?>
|