Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
1594c617
Commit
1594c617
authored
Jul 02, 2019
by
Micha Müller
Browse files
Pusher: Caliper plugin: fix timestamp bug
parent
86475ea5
Changes
1
Hide whitespace changes
Inline
Side-by-side
dcdbpusher/sensors/caliper/CaliperSensorGroup.cpp
View file @
1594c617
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment