Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 97ae5385 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Formalize time bases in battery stats.

Battery stats used to revolve around a single time base
it maintained, "battery uptime and realtime."  This is derived
from the system's uptime and realtime, but only increments while
the device is on battery.  It is used to update its timers for
things like the screen being on, wake locks, etc only while the
device is not plugged in to power.

This change formalizes that time base into a separate class that
maintains all of its state.  This is used to introduce a new
time base, "battery screen off," which only increments while the
device is on battery *and* the screen is off.  Wake locks are now
based on this time base, so we don't count them while the screen
is on -- it is misleading to have them increment while the screen
is on because the device is defined to always stay awake anyway
during that time, so what they are doing is irrelevant.

Change-Id: I020e20c930d8dca2953c6c3ddef1dc93c24161a5
parent 2c9fc105
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment