Development

#1400: sfTimer.class.php.patch

You must first sign up to be able to contribute.

Ticket #1400: sfTimer.class.php.patch

File sfTimer.class.php.patch, 0.6 kB (added by gucky, 2 years ago)

diff against r3382

  • sfTimer.class.php

    old new  
    4545 
    4646  /** 
    4747   * Stops the timer and add the amount of time since the start to the total time. 
     48   * 
     49   * @return integer Time spend for the last call. 
    4850   */ 
    4951  public function addTime() 
    5052  { 
    51     $this->totalTime += microtime(true) - $this->startTime; 
     53    $spend = microtime(true) - $this->startTime; 
     54    $this->totalTime += $spend; 
    5255    ++$this->calls; 
     56    return $spend; 
    5357  } 
    5458 
    5559  /**