You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let reportingInterval be the result of 1 / reportingFrequency.
Let timestampDelta be the result of latest reading["timestamp"] - lastReportedTimestamp.
If timestampDelta is greater than or equal to reportingInterval
[...]
reportingFrequency is measured in Hz, so reportingInterval is measured in seconds. latest reading["timestamp"] and lastReportedTimestamp, on the other hand, are high resolution timestamps measured in milliseconds.
A timestampDelta of 2 means a different of two milliseconds, while a sampling frequency of 1Hz means reportingInterval is 1 and the check above will be true even though it should not.
The text was updated successfully, but these errors were encountered:
https://w3c.github.io/sensors/#report-latest-reading-updated has:
reportingFrequency
is measured in Hz, soreportingInterval
is measured in seconds.latest reading["timestamp"]
andlastReportedTimestamp
, on the other hand, are high resolution timestamps measured in milliseconds.A
timestampDelta
of 2 means a different of two milliseconds, while a sampling frequency of 1Hz meansreportingInterval
is 1 and the check above will be true even though it should not.The text was updated successfully, but these errors were encountered: