src/Profiler.php
public function setStart($timeStamp = 0.0, $memoryBytes = 0)
	{
		if (!empty($this->points))
		{
			throw new \RuntimeException('The start point cannot be adjusted after points are added to the profiler.');
		}

		$this->startTimeStamp   = $timeStamp;
		$this->startMemoryBytes = $memoryBytes;

		$point = new ProfilePoint('start');

		// Store the point.
		$this->points[] = $point;

		// Add it in the lookup table.
		$this->lookup[$point->getName()] = \count($this->points) - 1;

		return $this;
	}
public function setStart($timeStamp = 0.0, $memoryBytes = 0)
	{
		if (!empty($this->points))
		{
			throw new \RuntimeException('The start point cannot be adjusted after points are added to the profiler.');
		}

		$this->startTimeStamp   = $timeStamp;
		$this->startMemoryBytes = $memoryBytes;

		$point = new ProfilePoint('start');

		// Store the point.
		$this->points[] = $point;

		// Add it in the lookup table.
		$this->lookup[$point->getName()] = \count($this->points) - 1;

		return $this;
	}
public function setStart ( $ timeStamp = 0.0 , $ memoryBytes = 0 ) { if ( ! empty ( $ this -> points ) ) { throw new \ RuntimeException ( 'The start point cannot be adjusted after points are added to the profiler.' ) ; } $ this -> startTimeStamp = $ timeStamp ; $ this -> startMemoryBytes = $ memoryBytes ; $ point = new ProfilePoint ( 'start' ) ; // Store the point. $ this -> points [ ] = $ point ; // Add it in the lookup table. $ this -> lookup [ $ point -> getName ( ) ] = \ count ( $ this -> points ) - 1 ; return $ this ; }
Creates a profile point with the specified starting time and memory.

This method will only add a point if no other points have been added as the ProfilePointInterface objects created before changing
the start point would result in inaccurate measurements.

@param   float    $timeStamp    Unix timestamp in microseconds when the profiler should start measuring time.
@param   integer  $memoryBytes  Memory amount in bytes when the profiler should start measuring memory.

@return  ProfilerInterface  This method is chainable.

@since   1.2.0
@throws  \RuntimeException
Creates a profile point with the specified starting time and memory .