Recording computer's real-time in milliseconds
I'm synching my OS experiment with an external device, off-line.
Therefore, I would like to record (in milliseconds) the exact timing of different parts of my experiment, according to my computer clock. For example, knowing that the stimuli was presented at: 09:25:07.859588 will allow me sample the external device in this particular time.
I've found this command:
import datetime var.TimeResp = datetime.datetime.time(datetime.datetime.now())
I tried to add an inline scripts prior to every part i'm interested in, but calculating the timing afterward seemed to be unreliable (roughly ±150 msc than what it should have been).
Any better ideas?