summaryrefslogtreecommitdiff
path: root/core/SystemStatus.h
diff options
context:
space:
mode:
authorBaili Feng <bailif@codeaurora.org>2017-12-05 16:59:41 +0800
committerBaili Feng <bailif@codeaurora.org>2017-12-05 16:59:41 +0800
commitedcf00043593e125ccc798a70fb6ce2c9318444b (patch)
tree44558b815a31d53c55d02f006b8877f8a3b074c1 /core/SystemStatus.h
parent6ccaa83f60d0014b1c6414ef380a7d3a456a678b (diff)
downloadgps-edcf00043593e125ccc798a70fb6ce2c9318444b.tar.gz
Replace wall time
Replace gettimeofday with clock_gettime CRs-fixed: 2144315 Change-Id: Ie8472d2aedcd0e63b86cc5ff100ce9bb28fd670c
Diffstat (limited to 'core/SystemStatus.h')
-rw-r--r--core/SystemStatus.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/SystemStatus.h b/core/SystemStatus.h
index 0c9b4b9..4f53c0b 100644
--- a/core/SystemStatus.h
+++ b/core/SystemStatus.h
@@ -70,10 +70,10 @@ public:
static const uint32_t maxItem = 5;
SystemStatusItemBase() {
- timeval tv;
- gettimeofday(&tv, NULL);
+ struct timespec tv;
+ clock_gettime(CLOCK_MONOTONIC, &tv);
mUtcTime.tv_sec = tv.tv_sec;
- mUtcTime.tv_nsec = tv.tv_usec *1000ULL;
+ mUtcTime.tv_nsec = tv.tv_nsec;
mUtcReported = mUtcTime;
};
virtual ~SystemStatusItemBase() { };