Correct some callers of time functions that expect monotonic clocks

This commit is contained in:
Cameron Gutman
2020-10-18 20:05:09 -05:00
parent 766c9628b0
commit e53a1f90b0
4 changed files with 16 additions and 11 deletions
@@ -1,5 +1,7 @@
package com.limelight.binding.video;
import android.os.SystemClock;
class VideoStats {
long decoderTimeMs;
@@ -50,7 +52,7 @@ class VideoStats {
}
VideoStatsFps getFps() {
float elapsed = (System.currentTimeMillis() - this.measurementStartTimestamp) / (float) 1000;
float elapsed = (SystemClock.uptimeMillis() - this.measurementStartTimestamp) / (float) 1000;
VideoStatsFps fps = new VideoStatsFps();
if (elapsed > 0) {