Location: PHPKode > scripts > Boolean Minimization > boolean-minimization/Chronometer.php
<?php
class Chronometer
{
    var $startTime;
    var $endTime;

    function start()
    {
        $this->startTime=gettimeofday();
    }

    function stop()
    {
        $this->endTime=gettimeofday();
    }

    function show($precision=3)
    {
        $time = (float)($this->endTime['sec'] - $this->startTime['sec']) + ((float)($this->endTime['usec'] - $this->startTime['usec'])/1000);
        return (round($time, $precision));
    }
}
?>
Return current item: Boolean Minimization