@classmethod
def format_time(cls, sec):
    """Formats a time interval for human consumption"""
    intervals = [[60 * 60 * 24, 'd'], [60 * 60, 'h'], [60, 'm']]
    text = ''
    for s, label in intervals:
        if sec >= s and sec // s > 0:
            text = '{0} {1}{2}'.format(text, sec // s, label)
            sec -= s * (sec // s)
    if sec > 0:
        text += ' {0}s'.format(sec)
    return text.strip()
