Time stamps and timing

In order to be able to interpret the data collected by the eye tracker in the context of something else, e.g. presented stimuli or data from other sources such as EEG, it is important that the data is synchronized in time with whatever it is going to be analysed in conjunction with.

Time stamps

A time stamp in the Tobii Pro SDK is a value that indicates the time when the information used to produce the gaze data was sampled by the eye tracker. The value should be interpreted as a time interval in microseconds measured from an arbitrary point in time. In the Pro SDK there are two kinds of time stamps: device time stamp and system time stamp. The source of the device time stamp is the internal clock in the eye tracker hardware while the system time stamp uses the computer on which the application is running as the source.

Time stamps in the Pro SDK are generally given in microseconds.

Drift compensation

The two clocks naturally drift. To compensate for this, the Pro SDK will periodically ask the eye tracker about its current time stamp, noting the system time stamp when the request is sent and received. This data is then used to calculate how the system time corresponds to the device time, by using Christian's Algoritm .

When the Pro SDK starts to listen to data from the eye tracker, it first sends a number of requests to ask for the time stamp and saves the value with the lowest latency. It then waits and sends a number of requests again, once again saving the best value. It continues to do this throughout the session, getting values more often in the beginning and then with longer intervals when enough data has been collected.

If you want to calculate the system time stamp yourself, it is possible to subscribe to the time synchronization data that the Pro SDK is using in its calculations. Only the packages that have low latency and are actually used will be sent. From the values, it is possible to calculate the system time stamp from the device time stamp. You may also use the data to see the network latency to the eye tracker.

System latency

If you want to measure the latency of any of the data streams, this can be done by comparing the system time stamp of the received data with the time stamp returned by the "Get System Time Stamp" method (check reference guide for corresponding language binding for exact signature of method). Please note that the latency may change from data sample to data sample, and that some eye trackers will have greater latency when tracking fails (i.e. when validity of data is invalid)