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/report_factory.cpp b/src/report_factory.cpp
index f72a3f7..278b9f1 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -40,10 +40,10 @@
std::make_unique<Clock>());
});
- return std::make_unique<Report>(bus->get_io_context(), objServer, id, name,
- reportingType, reportActions, period,
- appendLimit, reportUpdates, reportManager,
- reportStorage, std::move(metrics), enabled);
+ return std::make_unique<Report>(
+ bus->get_io_context(), objServer, id, name, reportingType,
+ reportActions, period, appendLimit, reportUpdates, reportManager,
+ reportStorage, std::move(metrics), enabled, std::make_unique<Clock>());
}
Sensors ReportFactory::getSensors(