Class rex_timer

Class to stop the script time.

Package: redaxo\core
Author: gharlan
Located at redaxo/src/core/lib/util/timer.php

Methods summary

public
# __construct( float $start = null )

Constructor.

public static mixed
# measure( string $label, callable $callable )

Measures the runtime of the given callable.

public
# reset( )

Resets the timer.

public
# stop( )

Stops the timer.

public float
# getDelta( integer $precision = rex_timer::MILLISEC )

Returns the time difference.

public string
# getFormattedDelta( integer $precision = rex_timer::MILLISEC, integer $decimals = 3 )

Returns the formatted time difference.

Constants summary

integer SEC
#1
integer MILLISEC
#1000
integer MICROSEC
#1000000

Properties summary

public static array $serverTimings
#[]