public static function toReadableTime($time, $decimals = 3)
    {
        $decimals = (int) $decimals;
        $unit     = 'sec';

        return sprintf("%.{$decimals}f %s", $time, $unit);
    }
public static function toReadableTime($time, $decimals = 3)
    {
        $decimals = (int) $decimals;
        $unit     = 'sec';

        return sprintf("%.{$decimals}f %s", $time, $unit);
    }
public static function toReadableTime ( $ time , $ decimals = 3 ) { $ decimals = ( int ) $ decimals ; $ unit = 'sec' ; return sprintf ( "%.{$decimals}f %s" , $ time , $ unit ) ; }
Convert to readable time.

@param float $time
@param int   $decimals [optional]

@return string
Convert to readable time .