Better suited method.
authorRomain Forlot <romain.forlot@iot.bzh>
Tue, 16 May 2017 10:48:10 +0000 (12:48 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 19 May 2017 09:36:43 +0000 (11:36 +0200)
Change-Id: I287e445c6f1c372a852752911d032a70654aa082
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/low-can-binding/utils/timer.cpp
CAN-binder/low-can-binding/utils/timer.hpp

index 5c659ca..a7ed558 100644 (file)
@@ -64,7 +64,7 @@ frequency_clock_t::frequency_clock_t(float frequency)
 
 /// @brief Return the period in ms given the frequency in hertz.
 /// @param[in] frequency - Frequency to convert, in hertz
-float frequency_clock_t::frequency_to_period()
+float frequency_clock_t::frequency_to_period() const
 {
        return frequency_ == 0 ? 0 : 1 / frequency_;
 }
index d3fedbd..8ea7476 100644 (file)
@@ -47,7 +47,7 @@ public:
        float get_frequency() const;
        const struct timeval get_timeval_from_period() const;
 
-       float frequency_to_period();
+       float frequency_to_period() const;
        bool started();
        time_function_t get_time_function();
        bool elapsed(bool stagger);