Initial import

git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@1 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
jim
2006-03-26 18:42:23 +00:00
commit ef2239b689
9 changed files with 853 additions and 0 deletions

27
libs/speedometer.lib.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
class speedometer {
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);
}
}
?>