public static String getFormattedTimeWithDiff(String formattedFinishTime,
                                                  long finishTime, long startTime){
        StringBuilder buf = new StringBuilder();
        if (0 != finishTime) {
            buf.append(formattedFinishTime);
            if (0 != startTime){
                buf.append(" (" + formatTimeDiff(finishTime , startTime) + ")");
            }
        }
        return buf.toString();
    }
public static String getFormattedTimeWithDiff(String formattedFinishTime,
                                                  long finishTime, long startTime){
        StringBuilder buf = new StringBuilder();
        if (0 != finishTime) {
            buf.append(formattedFinishTime);
            if (0 != startTime){
                buf.append(" (" + formatTimeDiff(finishTime , startTime) + ")");
            }
        }
        return buf.toString();
    }
public static String getFormattedTimeWithDiff ( String formattedFinishTime , long finishTime , long startTime ) { StringBuilder buf = new StringBuilder ( ) ; if ( 0 != finishTime ) { buf . append ( formattedFinishTime ) ; if ( 0 != startTime ) { buf . append ( " (" + formatTimeDiff ( finishTime , startTime ) + ")" ) ; } } return buf . toString ( ) ; }
Formats time in ms and appends difference (finishTime - startTime)
as returned by formatTimeDiff().
If finish time is 0, empty string is returned, if start time is 0
then difference is not appended to return value.
@param formattedFinishTime formattedFinishTime to use
@param finishTime finish time
@param startTime start time
@return formatted value.
Formats time in ms and appends difference ( finishTime - startTime ) as returned by formatTimeDiff () . If finish time is 0 empty string is returned if start time is 0 then difference is not appended to return value .