Scientist\Result::getTime PHP Method

getTime() public method

Get the execution time of the callback.
public getTime ( ) : float
return float
    public function getTime()
    {
        return $this->endTime - $this->startTime;
    }

Usage Example

Example #1
0
 public function test_result_can_have_total_execution_time()
 {
     $r = new Result();
     $r->setStartTime(2);
     $r->setEndTime(5);
     $this->assertEquals(3, $r->getTime());
 }