$timers
$timers : array
List of all timers.
Class Timer
Provides a simple way to measure the amount of time that elapses between two points.
NOTE: All methods are static since the class is intended to measure throughout an entire application's life cycle.
start(string $name, float $time = null) : \CodeIgniter\Debug\Timer
Starts a timer running.
Multiple calls can be made to this method so that several execution points can be measured.
string | $name | The name of this timer. |
float | $time | Allows user to provide time. |
stop(string $name) : \CodeIgniter\Debug\Timer
Stops a running timer.
If the timer is not stopped before the timers() method is called, it will be automatically stopped at that point.
string | $name | The name of this timer. |
getElapsedTime(string $name, integer $decimals = 4) : null|float
Returns the duration of a recorded timer.
string | $name | The name of the timer. |
integer | $decimals | Number of decimal places. |
Returns null if timer exists by that name. Returns a float representing the number of seconds elapsed while that timer was running.
Loading…