Fixed issue with wrong timestamp
Telemetry service used steady_clock for generating timestamps, but it
produced incorrect time. This change makes telemetry service use
steady_clock for intervals and system_clock for timestamps.
Changed readings timestamp to display current timestamp instead of a
time when reading was received.
Tested:
- correct timestamp is visible on dbus
- other telemetry service features are still working
Change-Id: Ic49f45640532cfffaeff5e0bd5591e6d99e5def5
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/metric.hpp b/src/metric.hpp
index 1ff5bc2..859315e 100644
--- a/src/metric.hpp
+++ b/src/metric.hpp
@@ -19,8 +19,9 @@
void initialize() override;
void deinitialize() override;
std::vector<MetricValue> getReadings() const override;
- void sensorUpdated(interfaces::Sensor&, uint64_t) override;
- void sensorUpdated(interfaces::Sensor&, uint64_t, double value) override;
+ void sensorUpdated(interfaces::Sensor&, Milliseconds) override;
+ void sensorUpdated(interfaces::Sensor&, Milliseconds,
+ double value) override;
LabeledMetricParameters dumpConfiguration() const override;
uint64_t sensorCount() const override;