def format_elapsed_time(seconds):
    """
    Format time difference as "#d ##:##:##".

    :param seconds: [float] time difference in seconds
    :return: [str] formatted time difference
    """
    n_seconds = round(seconds)
    n_days, n_seconds = divmod(n_seconds, 3600 * 24)
    n_hours, n_seconds = divmod(n_seconds, 3600)
    n_minutes, n_seconds = divmod(n_seconds, 60)
    return '{}d {:02}:{:02}:{:02}'.format(n_days, n_hours, n_minutes, n_seconds
        )
