aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/utils/timer.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-31 17:01:54 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:26:18 +0200
commit6c988cacd4fa284b0effb12e65c76502565c4248 (patch)
tree5da33ffb297ba8926e7ce0f70d2dc8f92b07ccb2 /CAN-binder/low-can-binding/utils/timer.cpp
parent84f7395a94048df10fe88a41d6a43fdbc8f5785c (diff)
Retrieve signal last value and timestamp at once.
Change-Id: I8401030ece94b5e397b6d2b71b29ff4e435d1486 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/utils/timer.cpp')
-rw-r--r--CAN-binder/low-can-binding/utils/timer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/utils/timer.cpp b/CAN-binder/low-can-binding/utils/timer.cpp
index 4584b859..eb79f853 100644
--- a/CAN-binder/low-can-binding/utils/timer.cpp
+++ b/CAN-binder/low-can-binding/utils/timer.cpp
@@ -113,6 +113,11 @@ float frequency_clock_t::get_frequency() const
return frequency_;
}
+uint64_t frequency_clock_t::get_last_tick() const
+{
+ return last_tick_;
+}
+
/// @brief Force the clock to tick, regardless of it its time has actually
/// elapsed.
void frequency_clock_t::tick(uint64_t timestamp)