def format_time_cue(t):
    """
    Return a time in seconds in the HH:MM:SS.sss format used in WebVTT
    """

    return "%02d:%02d:%02d.%0.03d" % (
        t // 3600,
        (t % 3600) // 60,
        int(t % 60),
        (t * 1000) % 1000,
    )