Closed Bug 1261894 Opened 4 years ago Closed 3 years ago
High-res timestamp for devicemotion events should use values from device sensor rather than Gecko
Similar to bug 1222098, but for high-res timestamps.
Hi Dylan, do you have any plans to work on this? I'd like to ship the changes to Event.timeStamp in Firefox 54. Do you think this needs to block that?
If that means turning on high-res timestamps on Android, then doing so will basically regress bug 1222098, yes. I had a patch for that bug that handled high-res timestamps with a simple but somewhat ugly workaround; see comment 14 there.
Ok, then it looks like we need to handle high-res TimeStamps in that code since the high-res timestamp pref is set to ride the trains with Firefox 54. Are you able to work on this?
Sure, here's a patch. Flagging smaug for review since it was his decision not to include this as part of the patch for bug 1222098.
Assignee: nobody → droeh
Attachment #8842041 - Flags: review?(bugs)
Comment on attachment 8842041 [details] [diff] [review] High-res timestamp fix for DeviceMotion events >+ >+ static mozilla::TimeStamp tsnow = mozilla::TimeStamp::Now(); >+ static uint64_t first = aTimeStamp.Value(); Could you perhaps rename the variables. sInitialNow and sFirstEventTime or something Would be good to compare what kinds of timestamps we get in Chrome vs this patch.
Attachment #8842041 - Flags: review?(bugs) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/7b406378bfe5 Update InitDeviceMotionEvent to handle high-res timestamps. r=smaug
You need to log in before you can comment on or make changes to this bug.