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

Commit 20f99c60 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Fix potential divide-by-zero, can result in "soft bootloop" for some...

Merge "Fix potential divide-by-zero, can result in "soft bootloop" for some devices" into gingerbread
parents 5ee37f1f 2a1a1a61
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -701,12 +701,14 @@ public class ProcessStats {

        long sampleTime = mCurrentSampleTime - mLastSampleTime;
        long sampleRealTime = mCurrentSampleRealTime - mLastSampleRealTime;
        if (sampleRealTime > 0) {
            long percAwake = (sampleTime*100) / sampleRealTime;
            if (percAwake != 100) {
                pw.print(" with ");
                pw.print(percAwake);
                pw.print("% awake");
            }
        }
        pw.println(":");
        
        final int totalTime = mRelUserTime + mRelSystemTime + mRelIoWaitTime