Development

Changeset 3411

You must first sign up to be able to contribute.

Changeset 3411

Show
Ignore:
Timestamp:
02/06/07 09:17:38 (2 years ago)
Author:
fabien
Message:

added return value to sfTimer::addTime() (closes #1400 - patch from gucky)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/debug/sfTimer.class.php

    r3211 r3411  
    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 
     57    return $spend; 
    5358  } 
    5459