src/Shell/Helper/BenchmarkHelper.php
public function output($args = null) {
        // calculate diff
        $diff = $this->end->diff($this->begin);

        // decide stuff
        $msg = [];
        if($diff->d > 0) $msg[] = $this->plural($diff->d, 'd');
        if($diff->h > 0) $msg[] = $this->plural($diff->h, 'h');
        if($diff->i > 0) $msg[] = $this->plural($diff->i, 'i');
        $msg[] = $this->plural($diff->s);

        // return stuff
        return $this->str_lreplace(',', ' ' . __d('Unimatrix/cake', 'and'), implode(', ', $msg));
    }
public function output($args = null) {
        // calculate diff
        $diff = $this->end->diff($this->begin);

        // decide stuff
        $msg = [];
        if($diff->d > 0) $msg[] = $this->plural($diff->d, 'd');
        if($diff->h > 0) $msg[] = $this->plural($diff->h, 'h');
        if($diff->i > 0) $msg[] = $this->plural($diff->i, 'i');
        $msg[] = $this->plural($diff->s);

        // return stuff
        return $this->str_lreplace(',', ' ' . __d('Unimatrix/cake', 'and'), implode(', ', $msg));
    }
public function output ( $ args = null ) { // calculate diff $ diff = $ this -> end -> diff ( $ this -> begin ) ; // decide stuff $ msg = [ ] ; if ( $ diff -> d > 0 ) $ msg [ ] = $ this -> plural ( $ diff -> d , 'd' ) ; if ( $ diff -> h > 0 ) $ msg [ ] = $ this -> plural ( $ diff -> h , 'h' ) ; if ( $ diff -> i > 0 ) $ msg [ ] = $ this -> plural ( $ diff -> i , 'i' ) ; $ msg [ ] = $ this -> plural ( $ diff -> s ) ; // return stuff return $ this -> str_lreplace ( ',' , ' ' . __d ( 'Unimatrix/cake' , 'and' ) , implode ( ', ' , $ msg ) ) ; }
Calculate execution time
@return string
Calculate execution time