NullTimer
class NullTimer implements TimerInterface
Implementation of TimerInterface that does not actually record any time.
Used in production to reduce overhead.
Methods
__construct()
Empty constructor for forward compatibility.
void
start()
Starts the timer.
void
stop()
Stops the timer.
bool
isRunning()
Returns true if the timer is currently running.
float|null
getDuration()
Returns the time (in seconds) the timer ran.
Details
at line 19
__construct()
Empty constructor for forward compatibility.
at line 23
void
start()
Starts the timer.
at line 27
void
stop()
Stops the timer.
at line 31
bool
isRunning()
Returns true if the timer is currently running.
at line 36
float|null
getDuration()
Returns the time (in seconds) the timer ran.
Returns null if no time has been recorded.