first init

This commit is contained in:
Metrax
2012-05-09 20:05:43 +02:00
commit e05b7bb8f0
6205 changed files with 395435 additions and 0 deletions

46
htdocs/lib2/bench.inc.php Normal file
View File

@@ -0,0 +1,46 @@
<?php
/***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ
*
* Exact time mesurement
***************************************************************************/
class Cbench
{
var $start;
var $stop;
function CBench()
{
$this->start = 0;
$this->stop = 0;
}
function getmicrotime()
{
list($usec, $sec) = explode(' ', microtime());
return ((float)$usec + (float)$sec);
}
function start()
{
$this->start = $this->getmicrotime();
}
function stop()
{
$this->stop = $this->getmicrotime();
}
function diff()
{
$result = $this->stop - $this->start;
return $result;
}
function runTime()
{
$result = $this->getmicrotime() - $this->start;
return $result;
}
}
?>