Commit 1594c617 authored by Micha Müller's avatar Micha Müller
Browse files

Pusher: Caliper plugin: fix timestamp bug

parent 86475ea5
......@@ -160,7 +160,11 @@ void CaliperSensorGroup::read() {
reading_t reading;
reading.value = 1;
reading.timestamp = std::stoull(timestamp);
reading.timestamp = S_TO_NS(std::stoull(timestamp)); //Caliper timestamps are seconds since UNIX epoch
//a timestamp with a precision of seconds is not unique enough --> append current nanoseconds
uint64_t now_ns = getTimestamp() % 1000000000;
reading.timestamp += now_ns;
S_Ptr s;
auto it = _sensorIndex.find(feName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment