iTrace-Dev / iTrace-Core

iTrace Engine that interfaces with an eye tracker
http://www.i-trace.org/
GNU General Public License v3.0
6 stars 0 forks source link

Event Time might be better named to Event ID #85

Closed dtg3 closed 5 years ago

dtg3 commented 5 years ago

With the switch to C# the event time (high resolution timestamp) is no longer unix compatible timestamp. Therefore it acts more like and ID and we can use other UTC Unix timestamps in milliseconds.

dtg3 commented 5 years ago

Consider consolidating other time stamps and renames.

shbonita commented 5 years ago

http://developer.tobiipro.com/commonconcepts/timestamp-and-timing.html

dtg3 commented 5 years ago

If I'm reading the C# API correct we are using DateTime.UtcNow.Ticks for EventTime. Ticks should provide a resolution where one tick is one hundred nanoseconds.

GazePoint also uses CPU ticks as well for timing: This is a signed 64-bit integer which indicates the number of CPU time ticks. This allows high precision synchronization of gaze data with other data on the same CPU.

Tick resolution values can be compared for high precision duration and ordering, but converting back to a normal Unix system time (for mm/dd/yyyy hh:mm:ss) seems better suited for C# to do natively using a date time object. To provide both resolutions, we are using UTC system time converted to Unix time in milliseconds for core_time (when the core recorded/received gaze data) and plugin_time (when the plugin calculated/recorded its data). This represents a system/wall clock time.

We will need more testing and a working prototype of the new version to really determine if we need additional changes to our synchronization methods.

dtg3 commented 5 years ago

This issue should now be resolved in the core.