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
488fdbf8
Commit
488fdbf8
authored
Jul 16, 2019
by
Micha Müller
Browse files
Pusher: Caliper: Change timestamp precision to nanosec
parent
1a968c70
Changes
2
Hide whitespace changes
Inline
Side-by-side
dcdbpusher/Caliper/patch
View file @
488fdbf8
...
...
@@ -17,7 +17,7 @@
sbuf->append(timestamp_attr.id(),
- Variant(cali_make_variant_from_uint(chrono::system_clock::to_time_t(chrono::system_clock::now()))));
+ Variant(cali_make_variant_from_uint(
+ chrono::duration_cast<chrono::
micr
oseconds>(chrono::system_clock::now().time_since_epoch()).count())));
+ chrono::duration_cast<chrono::
nan
oseconds>(chrono::system_clock::now().time_since_epoch()).count())));
}
void post_init_cb(Caliper* c, Channel* chn) {
dcdbpusher/sensors/caliper/CaliperSensorGroup.cpp
View file @
488fdbf8
...
...
@@ -166,7 +166,7 @@ void CaliperSensorGroup::read() {
reading_t
reading
;
reading
.
value
=
1
;
reading
.
timestamp
=
US_TO_NS
(
std
::
stoull
(
timestamp
)
);
//Caliper timestamps are microseconds since UNIX epoch
reading
.
timestamp
=
std
::
stoull
(
timestamp
)
;
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