from datetime import datetime


def to_sec(t):
    """
        Convert canonical time format to milliseconds
        Example:
            - 00:00:10.930 to 10930
    """
    td = datetime.strptime(t, '%H:%M:%S.%f') - datetime(1900, 1, 1)
    return int(td.total_seconds() * 1000)