DebugKit\DebugTimer::requestTime PHP Method

requestTime() public static method

Get the total execution time until this point
public static requestTime ( ) : float
return float elapsed time in seconds since script start.
    public static function requestTime()
    {
        $start = self::requestStartTime();
        $now = microtime(true);
        return $now - $start;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Get the summary for the panel.
  *
  * @return string
  */
 public function summary()
 {
     $time = Number::precision(DebugTimer::requestTime(), 2) . ' s';
     $memory = Number::toReadableSize(DebugMemory::getPeak());
     return "{$time} / {$memory}";
 }
All Usage Examples Of DebugKit\DebugTimer::requestTime