diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2019-04-25 16:08:26 -0700 |
---|---|---|
committer | Mike Cailean <mcailean@codeaurora.org> | 2019-05-01 13:46:49 -0700 |
commit | bb5cbeed24bdf26ff6dc54592bbaca6e1f418865 (patch) | |
tree | dcdaf27efd2871996a552da29d85dedcbe48b3c5 /core/SystemStatus.h | |
parent | 2c71ec9e02ea234106d520717fc36eb4f3ad7c48 (diff) | |
download | gps-bb5cbeed24bdf26ff6dc54592bbaca6e1f418865.tar.gz |
Age Second field in GNSS debug data is incorrect
Change-Id: Iec28f9dbbc3b9cfe9a5d06e1f198a02cf09047be
CRs-fixed: 2434780
Diffstat (limited to 'core/SystemStatus.h')
-rw-r--r-- | core/SystemStatus.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/SystemStatus.h b/core/SystemStatus.h index 399a6c4..0dbcf91 100644 --- a/core/SystemStatus.h +++ b/core/SystemStatus.h @@ -68,15 +68,15 @@ namespace loc_core class SystemStatusItemBase { public: - timespec mUtcTime; // UTC timestamp when this info was last updated - timespec mUtcReported; // UTC timestamp when this info was reported + timespec mUtcTime; + timespec mUtcReported; static const uint32_t maxItem = 5; SystemStatusItemBase() { - struct timespec tv; - clock_gettime(CLOCK_MONOTONIC, &tv); + timeval tv; + gettimeofday(&tv, NULL); mUtcTime.tv_sec = tv.tv_sec; - mUtcTime.tv_nsec = tv.tv_nsec; + mUtcTime.tv_nsec = tv.tv_usec*1000ULL; mUtcReported = mUtcTime; }; virtual ~SystemStatusItemBase() {}; |