Benchmark modifications > fixed typos and proper diff

From: Date: Sun, 27 Oct 2002 16:56:00 +0000
Subject: Benchmark modifications > fixed typos and proper diff
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10292@lists.php.net to get a copy of this message
Adding the modifications to Timer class for setting precision

62a63,70 > * Number of decimal places of time elapsed > * > * @var int > * @access private > */ > var $_precision; > > /** 83c91 < function Benchmark_Timer($auto = false) { --- > function Benchmark_Timer($auto = false, $precision=6) { 88a97 > $this->_precision = $precision; 99d107 < $this->display(); 101a110,132 > > /** > * Sets precision of the time difference. > * > * @param int number of decimal places precision > * @access public > */ > function setPrecision($precision) > { > if((is_int($precision))&&($precision>0)){ > $this->_precision = $precision; > } > } > > /** > * Gets precision of the time difference. > * > * @access public > */ > function getPrecision() > { > return $this->_precision; > } 208c239 < return bcsub($this->markers[$end], $this->markers[$start], 6); --- > return bcsub($this->markers[$end], $this->markers[$start], $this->_precision); 231,232c262,263 < $diff = bcsub($time, $temp, 6); < $total = bcadd($total, $diff, 6); --- > $diff = bcsub($time, $temp, $this->_precision); > $total = bcadd($total, $diff, $this->_precision);
« previous php.pear.dev (#10292) next »