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/on_change_threshold.hpp b/src/on_change_threshold.hpp
index 7eb1f6d..61c75d5 100644
--- a/src/on_change_threshold.hpp
+++ b/src/on_change_threshold.hpp
@@ -25,13 +25,13 @@
{}
void initialize() override;
- void sensorUpdated(interfaces::Sensor&, uint64_t) override;
- void sensorUpdated(interfaces::Sensor&, uint64_t, double) override;
+ void sensorUpdated(interfaces::Sensor&, Milliseconds) override;
+ void sensorUpdated(interfaces::Sensor&, Milliseconds, double) override;
private:
const Sensors sensors;
const std::vector<std::string> sensorNames;
const std::vector<std::unique_ptr<interfaces::TriggerAction>> actions;
- void commit(const std::string&, uint64_t, double);
+ void commit(const std::string&, Milliseconds, double);
};