def get_tid_timestamp_from_event(event):
    """
    Return the thread ID & timestamp (in sec) from a event
    """

    # line 1 of each event: the program name; thread id (tid); time (in sec); cycles took for the trace (not sure)
    # Example:
    #   demo_sift1M_rea  3100   945.398942:          1 cycles: 

    fields_with_spaces = event[0].replace("\t", "").replace("\n", "").replace(":", "").split(" ")
    fields = []
    for f in fields_with_spaces:
        if f != '':
            fields.append(f)
    tid = int(fields[1])
    timestamp = float(fields[2])

    return tid, timestamp