def s2time(
    secs: float,
    show_secs: bool = True,
    show_fracs: bool = True
) -> str:
    """Convert seconds to time.

    Args:
        secs (float):

        show_secs (bool):
            Show seconds (default: True)

        show_fracs (bool):
            Show centiseconds (default: True)

    Returns:
        str:
            `HH:MM` / `HH:MM:SS` / `HH:MM:SS.CS` string
    """
    try:
        secs = max(0, float(secs))
    except ValueError:
        placeholder = "--:--"
        if show_secs:
            placeholder += ":--"
            if show_fracs:
                placeholder += ".--"
        return placeholder
    wholesecs = int(secs)
    centisecs = int((secs - wholesecs) * 100)
    hh = int(wholesecs / 3600)
    hd = int(hh % 24)
    mm = int((wholesecs / 60) - (hh*60))
    ss = int(wholesecs - (hh*3600) - (mm*60))
    r = f"{hd:02d}:{mm:02d}"
    if show_secs:
        r += f":{ss:02d}"
        if show_fracs:
            r += f".{centisecs:02d}"
    return r