Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

how to have the "datetime" in milliseconds

Hi everyone,
I need to have the "datetime" column in the log file in milliseconds.
I'm using this at the beginning of the experiment:

but this is about two seconds later than the "datetime" and the reason is that the "datetime" starts when the backend starts!
since all of the time columns are relative to this column("datetime"), it is important for me to have the beginning time with more precision.
(I'm trying to use the "datetime" column to sync the Opensesame and EEG. we are running both EEG and Opensesame on one PC)

Thanks in advace


  • @sebastiaan, would you give me your opinion about this?
    we are going to use the ABM-X10 EEG and we are running both EEG and Opensesame in the same PC.
    we want to make sure that we have both synchronized.
    if we could have the "datetime" in millisecond precision then we would be able to use all the "time" columns as the relative to the begin time.
    but I don't know how to have the "datetime" in milliseconds/microseconds.
    I need your help in this regard or if you have any other suggestions for the time synchronization.
    Thanks in advance, really appreciate your efforts here.

  • Hi Kian,

    If I understand correctly, you want to translate the timestamps as used by OpenSesame into absolute system time. Is that right?

    If so, then you could simultaneously log the absolute time and the OpenSesame timestamp at the start of the experiment. Based on this synchronization point, you could then translate the one into the other, if you see what I mean.

    from datetime import datetime
    var.syncpoint_datetime ='%d-%m-%y %H:%M:%f')
    var.syncpoint_timestamp = clock.time()

    In general though, I would recommend sending triggers to the EEG recording device/ software, rather than relying on clock synchronization. That's a much more transparent way to make sure that you know what happened when!


Sign In or Register to comment.