protected function calculateAndFormatIndexingTime() {
        $indexingTime = time() - $this->startTime;
        if ($indexingTime > 3600) {
            // format hours
            $indexingTime = $indexingTime / 3600;
            $indexingTime = number_format($indexingTime, 2, ',', '.');
            $indexingTime .= ' hours';
        } else {
            if ($indexingTime > 60) {
                // format minutes
                $indexingTime = $indexingTime / 60;
                $indexingTime = number_format($indexingTime, 2, ',', '.');
                $indexingTime .= ' minutes';
            } else {
                $indexingTime .= ' seconds';
            }
        }

        return $indexingTime;
    }
protected function calculateAndFormatIndexingTime() {
        $indexingTime = time() - $this->startTime;
        if ($indexingTime > 3600) {
            // format hours
            $indexingTime = $indexingTime / 3600;
            $indexingTime = number_format($indexingTime, 2, ',', '.');
            $indexingTime .= ' hours';
        } else {
            if ($indexingTime > 60) {
                // format minutes
                $indexingTime = $indexingTime / 60;
                $indexingTime = number_format($indexingTime, 2, ',', '.');
                $indexingTime .= ' minutes';
            } else {
                $indexingTime .= ' seconds';
            }
        }

        return $indexingTime;
    }
protected function calculateAndFormatIndexingTime ( ) { $ indexingTime = time ( ) - $ this -> startTime ; if ( $ indexingTime > 3600 ) { // format hours $ indexingTime = $ indexingTime / 3600 ; $ indexingTime = number_format ( $ indexingTime , 2 , ',' , '.' ) ; $ indexingTime .= ' hours' ; } else { if ( $ indexingTime > 60 ) { // format minutes $ indexingTime = $ indexingTime / 60 ; $ indexingTime = number_format ( $ indexingTime , 2 , ',' , '.' ) ; $ indexingTime .= ' minutes' ; } else { $ indexingTime .= ' seconds' ; } } return $ indexingTime ; }
create human readable string for indexing time

@return float|int|string
create human readable string for indexing time