Closed
Bug 1007647
Opened 10 years ago
Closed 4 years ago
Add support for getting realtime and/or uptime milliseconds since boot in JavaScript for Telemetry
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: mfinkle, Unassigned)
References
Details
Telemetry events and sessions use a relative timestamp. In Java we have access to SystemClock.elapsedRealtime() and SystemClock.uptimeMillis() but we don't in JavaScript.
Let's see if we can expose those somehow and use those to create fallback timestamps so callers don't always need to pass in a timestamp.
Comment 1•10 years ago
|
||
Relevant:
http://stackoverflow.com/questions/6360210/androidlinux-uptime-using-clock-monotonic
http://mxr.mozilla.org/mozilla-central/source/browser/app/nsBrowserApp.cpp#454
OS: Linux → Android
Hardware: x86_64 → All
Summary: Add support for getting realtime and/or uptime milliseconds since boot for Telemetry → Add support for getting realtime and/or uptime milliseconds since boot in JavaScript for Telemetry
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to :Irving Reid from comment #2)
> Does bug 969490 solve this for you?
It allows us to improve our current code:
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/UITelemetry.jsm#93
IIUC, we can now change:
return Date.now() - Services.startup.getStartupInfo().process;
to this:
return Components.utils.now();
And we have better precision.
In both cases, the "uptime" is measured from the process creation. To match Java's uptime definition, we want the timebase to be device boot.
Flags: needinfo?(mark.finkle)
Comment 4•4 years ago
|
||
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•