public static String secondsToDHMSString(double seconds) {
        if (seconds < 60) {
            return doubleToString(seconds, 2, 2) + 's';
        }
        long secs = (int) (seconds);
        long mins = secs / 60;
        long hours = mins / 60;
        long days = hours / 24;
        secs %= 60;
        mins %= 60;
        hours %= 24;
        StringBuilder result = new StringBuilder();
        if (days > 0) {
            result.append(days);
            result.append('d');
        }
        if ((hours > 0) || (days > 0)) {
            result.append(hours);
            result.append('h');
        }
        if ((hours > 0) || (days > 0) || (mins > 0)) {
            result.append(mins);
            result.append('m');
        }
        result.append(secs);
        result.append('s');
        return result.toString();
    }