protected String convertToPerformanceView(long afterMinusBefore) { // from DfTraceViewUtil.java
        if (afterMinusBefore < 0) {
            return String.valueOf(afterMinusBefore);
        }

        long sec = afterMinusBefore / 1000;
        final long min = sec / 60;
        sec = sec % 60;
        final long mil = afterMinusBefore % 1000;

        final StringBuffer sb = new StringBuffer();
        if (min >= 10) { // Minute
            sb.append(min).append("m");
        } else if (min < 10 && min >= 0) {
            sb.append("0").append(min).append("m");
        }
        if (sec >= 10) { // Second
            sb.append(sec).append("s");
        } else if (sec < 10 && sec >= 0) {
            sb.append("0").append(sec).append("s");
        }
        if (mil >= 100) { // Millisecond
            sb.append(mil).append("ms");
        } else if (mil < 100 && mil >= 10) {
            sb.append("0").append(mil).append("ms");
        } else if (mil < 10 && mil >= 0) {
            sb.append("00").append(mil).append("ms");
        }

        return sb.toString();
    }
protected String convertToPerformanceView ( long afterMinusBefore ) { if ( afterMinusBefore < 0 ) { return String . valueOf ( afterMinusBefore ) ; } long sec = afterMinusBefore / 1000 ; final long min = sec / 60 ; sec = sec % 60 ; final long mil = afterMinusBefore % 1000 ; final StringBuffer sb = new StringBuffer ( ) ; if ( min >= 10 ) { sb . append ( min ) . append ( "m" ) ; } else if ( min < 10 && min >= 0 ) { sb . append ( "0" ) . append ( min ) . append ( "m" ) ; } if ( sec >= 10 ) { sb . append ( sec ) . append ( "s" ) ; } else if ( sec < 10 && sec >= 0 ) { sb . append ( "0" ) . append ( sec ) . append ( "s" ) ; } if ( mil >= 100 ) { sb . append ( mil ) . append ( "ms" ) ; } else if ( mil < 100 && mil >= 10 ) { sb . append ( "0" ) . append ( mil ) . append ( "ms" ) ; } else if ( mil < 10 && mil >= 0 ) { sb . append ( "00" ) . append ( mil ) . append ( "ms" ) ; } return sb . toString ( ) ; }
Convert to performance view.
@param afterMinusBefore The difference between before time and after time.
@return The view string to show performance. e.g. 01m40s012ms (NotNull)