Drupal 8  8.0.2
Timer Class Reference

Static Public Member Functions

static start ($name)
 
static read ($name)
 
static stop ($name)
 

Static Protected Attributes

static $timers = array()
 

Detailed Description

Provides helpers to use timers throughout a request.

Member Function Documentation

static read (   $name)
static

Reads the current timer value without stopping the timer.

Parameters
string$nameThe name of the timer.
Returns
int The current timer value in ms.

Referenced by TimerTest\testTimer().

Here is the caller graph for this function:

static start (   $name)
static

Starts the timer with the specified name.

If you start and stop the same timer multiple times, the measured intervals will be accumulated.

Parameters
$nameThe name of the timer.

Referenced by TimerTest\testTimer().

Here is the caller graph for this function:

static stop (   $name)
static

Stops the timer with the specified name.

Parameters
string$nameThe name of the timer.
Returns
array A timer array. The array contains the number of times the timer has been started and stopped (count) and the accumulated timer value in ms (time).

Referenced by TimerTest\testTimer().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: