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

Commit 66fb25e4 authored by Varad Gautam's avatar Varad Gautam
Browse files

gpuwork: Fix msec to nsec time divisor



Flag: EXEMPT bugfix
Bug: 347657694
Test: statsd_testdrive 10147
Change-Id: Icaa54c62aedac0ee5d82dc3d02e319dc9a1e6118
Signed-off-by: default avatarVarad Gautam <varadgautam@google.com>
parent 2f23109f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@

#include "gpuwork/gpuWork.h"

#define ONE_MS_IN_NS (10000000)
#define MSEC_PER_NSEC (1000LU * 1000LU)

namespace android {
namespace gpuwork {
@@ -404,8 +404,8 @@ AStatsManager_PullAtomCallbackReturn GpuWork::pullWorkAtoms(AStatsEventList* dat
            }
            const UidTrackingInfo& info = it->second;

            uint64_t total_active_duration_ms = info.total_active_duration_ns / ONE_MS_IN_NS;
            uint64_t total_inactive_duration_ms = info.total_inactive_duration_ns / ONE_MS_IN_NS;
            uint64_t total_active_duration_ms = info.total_active_duration_ns / MSEC_PER_NSEC;
            uint64_t total_inactive_duration_ms = info.total_inactive_duration_ns / MSEC_PER_NSEC;

            // Skip this atom if any numbers are out of range. |duration| is
            // already checked above.