src/Support/Profiler.php
/**
	 * Stops a timer for the specified profile name and returns the total time taken for this run alone.
	 *
	 * @param string $profile
	 * @return float
	 */
Stops a timer for the specified profile name and returns the total time taken for this run alone.
@param string $profile
@return float
Stops a timer for the specified profile name and returns the total time taken for this run alone . @param string $profile @return float
public static function stop($profile) {
		if (!isset(static::$active[$profile])) {
			return;
		}
		$startTime = static::$active[$profile]['start'];
		$endTime = static::getTime();
		$timeTaken = $endTime - $startTime;
		static::$active[$profile]['end'] = $endTime;
		static::$active[$profile]['duration'] = $timeTaken;
		static::$records[$profile][] = static::$active[$profile];
		static::$totals[$profile] += static::$active[$profile]['duration'];
		unset(static::$active[$profile]);
		return $timeTaken;
	}
public static function stop ( $ profile ) { if ( ! isset ( static :: $ active [ $ profile ] ) ) { return ; } $ startTime = static :: $ active [ $ profile ] [ 'start' ] ; $ endTime = static :: getTime ( ) ; $ timeTaken = $ endTime - $ startTime ; static :: $ active [ $ profile ] [ 'end' ] = $ endTime ; static :: $ active [ $ profile ] [ 'duration' ] = $ timeTaken ; static :: $ records [ $ profile ] [ ] = static :: $ active [ $ profile ] ; static :: $ totals [ $ profile ] += static :: $ active [ $ profile ] [ 'duration' ] ; unset ( static :: $ active [ $ profile ] ) ; return $ timeTaken ; }
Stops a timer for the specified profile name and returns the total time taken for this run alone.
Stops a timer for the specified profile name and returns the total time taken for this run alone .
// Get the start and end time // Store the end time // Record the profile results // Remove the profile // Return the time taken