From e2af4a871c6a8bcab4733193948833aed9c5ceb8 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 17 Jul 2017 10:59:10 +0200 Subject: Format Change-Id: I036befbfb38b01d046d35a1364c28e0835dcbd41 Signed-off-by: Romain Forlot --- low-can-binding/utils/timer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'low-can-binding/utils/timer.cpp') diff --git a/low-can-binding/utils/timer.cpp b/low-can-binding/utils/timer.cpp index d21b7474..9152a096 100644 --- a/low-can-binding/utils/timer.cpp +++ b/low-can-binding/utils/timer.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include "timer.hpp" @@ -25,7 +25,7 @@ long long int system_time_us() { struct timespec t_usec; long long int timestamp_usec = 0; - + if(!::clock_gettime(CLOCK_MONOTONIC, &t_usec)) timestamp_usec = (t_usec.tv_nsec / 1000ll) + (t_usec.tv_sec* 1000000ll); return timestamp_usec; @@ -35,7 +35,7 @@ long long int system_time_ms() { struct timespec t_msec; long long int timestamp_msec = 0; - + if(!::clock_gettime(CLOCK_MONOTONIC, &t_msec)) timestamp_msec = (t_msec.tv_nsec / 1000000ll) + (t_msec.tv_sec* 1000ll); return timestamp_msec; @@ -45,7 +45,7 @@ long long int system_time_s() { struct timespec t_sec; long long int timestamp_sec = 0; - + if(!::clock_gettime(CLOCK_MONOTONIC, &t_sec)) timestamp_sec = t_sec.tv_sec; return timestamp_sec; @@ -76,7 +76,7 @@ float frequency_clock_t::frequency_to_period() const return frequency_ == 0 ? 0 : 1 / frequency_; } -/// @brief Return a timeval struct based on the frequency_ member. used to +/// @brief Return a timeval struct based on the frequency_ member. used to /// specified CAN BCM timers. const struct timeval frequency_clock_t::get_timeval_from_period() const { -- cgit 1.2.3-korg