Elgg\Profiler::buildTree PHP Method

buildTree() public method

Return a tree of time periods from a Timer
public buildTree ( Timer $timer ) : array
$timer Timer Timer object
return array
    public function buildTree(Timer $timer)
    {
        $times = $timer->getTimes();
        if (!isset($times[':end'])) {
            $times[':end'] = microtime();
        }
        $begin = $this->findBeginTime($times);
        $end = $this->findEndTime($times);
        $this->total = $this->diffMicrotime($begin, $end);
        return $this->analyzePeriod('', $times);
    }