public function timestamp($domain, $where, $comment = null)
    {
        $now = microtime(true);
        $this->timestamp[] = array(
          'domain'  => $domain,
          'where'   => $where,
          'comment' => $comment,
          'when'    => $now,
          'memory'  => memory_get_usage(true),
          'duration'=> 0,
        );

        if ($this->pos > 0) {
            $this->timestamp[$this->pos - 1]['memory-peak'] = memory_get_peak_usage(true);
            $this->timestamp[$this->pos - 1]['duration']    = $now - $this->timestamp[$this->pos - 1]['when'];
        }
    
        $this->pos++;
    }
public function timestamp($domain, $where, $comment = null)
    {
        $now = microtime(true);
        $this->timestamp[] = array(
          'domain'  => $domain,
          'where'   => $where,
          'comment' => $comment,
          'when'    => $now,
          'memory'  => memory_get_usage(true),
          'duration'=> 0,
        );

        if ($this->pos > 0) {
            $this->timestamp[$this->pos - 1]['memory-peak'] = memory_get_peak_usage(true);
            $this->timestamp[$this->pos - 1]['duration']    = $now - $this->timestamp[$this->pos - 1]['when'];
        }
    
        $this->pos++;
    }
public function timestamp ( $ domain , $ where , $ comment = null ) { $ now = microtime ( true ) ; $ this -> timestamp [ ] = array ( 'domain' => $ domain , 'where' => $ where , 'comment' => $ comment , 'when' => $ now , 'memory' => memory_get_usage ( true ) , 'duration' => 0 , ) ; if ( $ this -> pos > 0 ) { $ this -> timestamp [ $ this -> pos - 1 ] [ 'memory-peak' ] = memory_get_peak_usage ( true ) ; $ this -> timestamp [ $ this -> pos - 1 ] [ 'duration' ] = $ now - $ this -> timestamp [ $ this -> pos - 1 ] [ 'when' ] ; } $ this -> pos ++ ; }
Timestamp, log a event with a time.

@param string $domain is the module or class.
@param string $where a more specific place in the domain.
@param string $comment on the timestamp.
Timestamp log a event with a time .