Register and return times, count and data elements
package | salt\utils |
---|
addData(string $name, mixed $value)
string
the name of the data
mixed
data to append
addTime(string $name, float $time)
string
name of the timer
float
time to add
decrement(string $name, integer $number = 1
) : integer
string
name of the counter
integer
number to substract, default 1
integer
the counter valueend(string $name) : float
The timer is destroyed after the call. If we call start() on it again, it will restart to 0
string
name of the timer
float
time of the ended timergetAllCounters() : array<mixed,integer>
array<mixed,integer>
all counters : name => intgetAllDatas() : array<mixed,mixed[]>
array<mixed,mixed[]>
all datas : name => array (mixed)getAllTimes() : array<mixed,float>
array<mixed,float>
all timers at their last stop() : name => floatgetCounter(string $name) : integer
string
name of a counter
integer
counter valuegetData(string $name) : NULL | array<mixed,mixed>
string
name of a data to retrieve
NULL
array<mixed,mixed>
: NULL if name does not exist. array of registered data otherwise.getTime(string $name) : float
string
name of a timer
float
timer value at the last stophasData(string $name) : boolean
string
name of a data
boolean
true if some data exists for name.increment(string $name, integer $number = 1
) : integer
string
name of the counter
integer
number to add, default 1
integer
the counter valueresetCount(string $name)
string
name of the counter
resetTime(string $name)
string
name of the timer
start(string $name)
string
name of the timer
stop(string $name) : float
string
name of the timer
float
time of the stopped timer$counters : array<mixed,integer>
array()
$datas : array<mixed,mixed>
array()
$inProgress : array<mixed,float>
array()
$times : array<mixed,float>
array()