TimeHandler
extends AbstractHandler
in package
Debug time handler class
Tags
Table of Contents
Properties
- $name : string|null
- Name of time measurement
- $start : float|null
- Start time
- $stop : float|null
- Stop time
Methods
- __construct() : mixed
- Constructor
- getElapsed() : string
- Get elapsed time
- getName() : string|null
- Get name
- getStart() : float|null
- Get start value
- getStop() : float
- Get stop value
- hasStarted() : bool
- Determined if the timer has started
- hasStopped() : bool
- Determined if the timer has stopped
- prepare() : array<string|int, mixed>
- Prepare handler data for storage
- prepareAsString() : string
- Prepare handler data as string
- prepareHeaderAsString() : string
- Prepare header string
- setName() : AbstractHandler
- Set name
- start() : TimeHandler
- Start timer
- stop() : TimeHandler
- Stop timer
Properties
$name
Name of time measurement
protected
string|null
$name
= null
$start
Start time
protected
float|null
$start
= null
$stop
Stop time
protected
float|null
$stop
= null
Methods
__construct()
Constructor
public
__construct([string|null $name = null ][, bool $start = true ]) : mixed
Instantiate a time handler object
Parameters
- $name : string|null = null
- $start : bool = true
getElapsed()
Get elapsed time
public
getElapsed() : string
Return values
stringgetName()
Get name
public
getName() : string|null
Return values
string|nullgetStart()
Get start value
public
getStart() : float|null
Return values
float|nullgetStop()
Get stop value
public
getStop() : float
Return values
floathasStarted()
Determined if the timer has started
public
hasStarted() : bool
Return values
boolhasStopped()
Determined if the timer has stopped
public
hasStopped() : bool
Return values
boolprepare()
Prepare handler data for storage
public
prepare() : array<string|int, mixed>
Return values
array<string|int, mixed>prepareAsString()
Prepare handler data as string
public
prepareAsString() : string
Return values
stringprepareHeaderAsString()
Prepare header string
public
prepareHeaderAsString() : string
Return values
stringsetName()
Set name
public
setName(string $name) : AbstractHandler
Parameters
- $name : string
Return values
AbstractHandlerstart()
Start timer
public
start() : TimeHandler
Return values
TimeHandlerstop()
Stop timer
public
stop() : TimeHandler