Replies: 1 comment 1 reply
-
If the goal is to timestamp the flanker display on the jsPsych side you can use the const trial = {
// some other stuff here to display flanker
on_load: () => {
load_event_utc = new Date(Date.now()).toUTCString();
},
on_finish: (data) => {
data.utc_timestamp = load_event_utc
}
} For EEG, just be aware that this won't give you a super precise onset of the flanker stimulus. With JavaScript there is currently no way to directly measure the moment that the screen updates. Instead, what this is doing is measuring the moment that the code to update the display finishes running. The actual display update could happen a few milliseconds before or after this point, depending on where in the refresh cycle the event loop is. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using a flanker task with an external EEG device that timestamps in UTC. I am looking to add a new column to the output file that has the UTC timestamp from the local machine, where the UTC value for each event is entered. How might I do that? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions