diff options
author | qctecmdr <qctecmdr@localhost> | 2019-05-09 05:51:19 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-09 05:51:19 -0700 |
commit | b5279670579bc2a7e78ed94b77b5ff0c0a5d145b (patch) | |
tree | 528a8bcf01f5f8210c0082be7b3c086c21cd356a /core | |
parent | 7e44d369797748812140b7631b7c5a2b9d443cb2 (diff) | |
parent | bb5cbeed24bdf26ff6dc54592bbaca6e1f418865 (diff) | |
download | gps-b5279670579bc2a7e78ed94b77b5ff0c0a5d145b.tar.gz |
Merge "Age Second field in GNSS debug data is incorrect"
Diffstat (limited to 'core')
-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() {}; |