jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
719 stars 271 forks source link

Use timers that take account of device sleep #1139

Closed PhilArmstrong closed 1 year ago

PhilArmstrong commented 1 year ago

System.nanoTime() does not measure time correctly across device sleep periods.

Use SystemClock.elapsedRealtime() & SystemClock.elapsedRealtimeNanos() instead.

PhilArmstrong commented 1 year ago

Sorry about the stray comment edit there.

gerhardol commented 1 year ago

Included with the proposed changes in #1141 Thanks!