RSI helpers  0.1
RSI helpers
Timer Class Reference

Public Member Functions

 stop ()
 Stop the running timer. More...
 
 start ($id)
 Start a timer. More...
 
 time ($id)
 Time for a single ID. More...
 
 total ()
 Total time. More...
 
 asText ()
 Text representation of times. More...
 
 asHtml ()
 HTML representation of times. More...
 
 __get ($name)
 
 __call ($name, $arguments)
 
 __toString ()
 

Data Fields

 $decimals = 3
 
 $times = []
 Times (value) per id (key). More...
 
 $count = []
 

Protected Member Functions

 pad ($value, $length)
 

Protected Attributes

 $_id = null
 Active id. More...
 
 $_start = null
 Time the active id started. More...
 

Detailed Description

Definition at line 5 of file Timer.php.

Member Function Documentation

◆ __call()

__call (   $name,
  $arguments 
)

Definition at line 103 of file Timer.php.

◆ __get()

__get (   $name)

Definition at line 99 of file Timer.php.

◆ __toString()

__toString ( )

Definition at line 107 of file Timer.php.

◆ asHtml()

asHtml ( )

HTML representation of times.

Returns
string

Definition at line 83 of file Timer.php.

◆ asText()

asText ( )

Text representation of times.

Returns
string

Definition at line 59 of file Timer.php.

◆ pad()

pad (   $value,
  $length 
)
protected

Definition at line 52 of file Timer.php.

◆ start()

start (   $id)

Start a timer.

Parameters
string$idID for the timer.

Definition at line 25 of file Timer.php.

◆ stop()

stop ( )

Stop the running timer.

Definition at line 17 of file Timer.php.

◆ time()

time (   $id)

Time for a single ID.

Parameters
string$idID of the timer.
Returns
float Time (including active timer).

Definition at line 36 of file Timer.php.

◆ total()

total ( )

Total time.

Returns
float

Definition at line 46 of file Timer.php.

Field Documentation

◆ $_id

$_id = null
protected

Active id.

Definition at line 11 of file Timer.php.

◆ $_start

$_start = null
protected

Time the active id started.

Definition at line 12 of file Timer.php.

◆ $count

$count = []

Definition at line 9 of file Timer.php.

◆ $decimals

$decimals = 3

Definition at line 7 of file Timer.php.

◆ $times

$times = []

Times (value) per id (key).

Definition at line 8 of file Timer.php.


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