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

Skip to content
Commit 7cba1d46 authored by Adam Lesinski's avatar Adam Lesinski
Browse files

UsageStats: Fix time change handling

When the time changed, we would end up creating a new stats file, even if we could
reuse an old one. On systems where the time toggled a lot, this would generate
hundreds of files and slow down other IO operations on this set.

Now we properly reuse stats files after time changes. The time at which a particular
file began recording was always clamped to the start of the interval (day, month, year).
However, this makes no sense when the time changes, and clamping to the start of the interval
would always cause a new file to be created, since the current time no longer fell into that
time interval. So now the time is just offset from the last file's end time.

Bug:22716352
Change-Id: I6cec156e2e93b4402116600fa09c1018f3b870fe
parent f8def4d4
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