Timestamp of the most recent gaze coordinates


I am having an issue with getting the correct timestamp for the most recent gaze coordinates. I have used two different functions to get the latest gaze coordinates. These functions are

1. [samples, events, drained] = Eyelink('GetQueuedData[eye])

2. [sample, raw] = Eyelink('NewestFloatSampleRaw[eye])

The issue I am having is that the timestamp of the latest gaze coordinates saved in the samples(1,end) acquired using 'GetQueuedData' is different than the timestamp of the sample.time acquired using 'NewestFloatSampleRaw'. I run these two functions one after another and the difference between the timestamps is sometimes around 500ms. What can be causing this problem? Has anyone had this problem before?

Kind Regards,



as Mario said, it may take more than one call to 'GetQueuedData' to drain the queue. the details are a bit hazy in my mind now, but i had issues with using 'GetQueuedData' reliably and ended up writing my own polling functions to collect the samples (this is feasible if your experiments spend a significant amount of time waiting).

another important thing is that you need to check for buffer overruns, once the buffer overflows then you start losing data. it's been a while since i wrestled with this stuff, but when i did i could not find a way to determine what the absolute size of the queue is, but it seemed to be in the order of a second or two.

one other thing that springs to mind is clock sync and drift between the stimulus computer and the Eyelink host. if you are running experiments where timing is critical, then you need to include code that keeps track of the differences in the system clocks of the two machines, so that you can correctly interpret stimulus and response onset times compared to gaze data times.