public static String getFormattedTime2(final int s) {
        int seconds = (int) (s + 0.5);
        final int hours = seconds / 3600;
        final int minutes = (seconds - hours * 3600) / 60;
        seconds = seconds - hours * 3600 - minutes * 60;
        String time = "";
        if (hours != 0) {
            time = hours + "h ";
        }
        if (minutes != 0) {
            time = time + minutes + "m ";
        }
        if (seconds != 0) {
            time = time + seconds + "s";
        }
        return time;
    }
writes the track in a selected output format to a string

@param t the track to format
@return the formatted string
main/src/main/java/cgeo/geocaching/brouter/core/Formatter.java