Knowing the time origin of event's timestamp
Knowing the time origin of event's timestamp Recently some browsers started to use High Resolution time stamps for their events. One of the major difference with the previous approach is that this duration isn't relative to the system epoch but to some "time origin" (most of the time approximately the time the document was loaded). The issue is that I cannot find any reliable way to check if the browser is using high res timestamps or the previous approach. It is not a problem if only event timestamps are compared, but if one wants to compare event timestamps with handmade timestamps, one needs to know if he should use Date.now() (relative to epoch) or precision.now() (relative to the time origin). Date.now() precision.now() For example, while safari mobile supports the performance api, some versions (e.g. the one in iOS 11.1) hasn't yet switched its events to High Resolution Time stamps. As a result, the following snippet produces nonsensically huge values for ...