requestTime() public static méthode

Get the total execution time until this point
public static requestTime ( ) : float
Résultat float elapsed time in seconds since script start.
Exemple #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}";
 }
 /**
  * testRequestTime
  *
  * @return void
  */
 public function testRequestTime()
 {
     $result1 = DebugTimer::requestTime();
     usleep(50);
     $result2 = DebugTimer::requestTime();
     $this->assertTrue($result1 < $result2);
 }