I regularly stamp messages into the EyeLink messagestream to indicate start and end times of on-screen events that I need to sync eyetracking analyses to. I do this by using the following command:
Eyelink('Message','This is an example message');
This causes a message to be stamped at that exact moment into the EyeLink messagestream. However, because I have to place the command just before or just after the on-screen event, technically it doesn't mark the exact moment of the event.
Ideally, I'd be able to get the timestamp of a Screen('Flip'), and then ask the EyeLink to posthumously stamp the message at the appropriate time in the messagestream. I know that I can handle this myself using a separate record of stimulus timestamps, but ideally I'd be able to store it in the EyeLink EDF, to avoid having multiple data files from each recording.
Does anyone know how to achieve this?