summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2019-05-09 05:51:19 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-05-09 05:51:19 -0700
commitb5279670579bc2a7e78ed94b77b5ff0c0a5d145b (patch)
tree528a8bcf01f5f8210c0082be7b3c086c21cd356a /core
parent7e44d369797748812140b7631b7c5a2b9d443cb2 (diff)
parentbb5cbeed24bdf26ff6dc54592bbaca6e1f418865 (diff)
downloadgps-b5279670579bc2a7e78ed94b77b5ff0c0a5d145b.tar.gz
Merge "Age Second field in GNSS debug data is incorrect"
Diffstat (limited to 'core')
-rw-r--r--core/SystemStatus.h10
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() {};