src/Controller/TimerController.php
public function timerAction($string)
    {
        // Did we use this one before?
        if (isset(static::$counterCache[$string]) === true) {
            // Add another to the counter.
            ++static::$counterCache[$string];
            static::$timekeeping['[' . static::$counterCache[$string] . ']' . $string] = microtime(true);
        } else {
            // First time counter, set it to 1.
            static::$counterCache[$string] = 1;
            static::$timekeeping[$string] = microtime(true);
        }

        return $this;
    }
public function timerAction($string)
    {
        // Did we use this one before?
        if (isset(static::$counterCache[$string]) === true) {
            // Add another to the counter.
            ++static::$counterCache[$string];
            static::$timekeeping['[' . static::$counterCache[$string] . ']' . $string] = microtime(true);
        } else {
            // First time counter, set it to 1.
            static::$counterCache[$string] = 1;
            static::$timekeeping[$string] = microtime(true);
        }

        return $this;
    }
public function timerAction ( $ string ) { // Did we use this one before? if ( isset ( static :: $ counterCache [ $ string ] ) === true ) { // Add another to the counter. ++ static :: $ counterCache [ $ string ] ; static :: $ timekeeping [ '[' . static :: $ counterCache [ $ string ] . ']' . $ string ] = microtime ( true ) ; } else { // First time counter, set it to 1. static :: $ counterCache [ $ string ] = 1 ; static :: $ timekeeping [ $ string ] = microtime ( true ) ; } return $ this ; }
Takes a "moment" for the benchmark test.

@param string $string
Defines a "moment" during a benchmark test.
The string should be something meaningful, like "Model invoice db call".

@return $this
Return $this for chaining
Takes a moment for the benchmark test .