summaryrefslogtreecommitdiffstats
path: root/low-can-binding/utils/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'low-can-binding/utils/timer.cpp')
-rw-r--r--low-can-binding/utils/timer.cpp10
1 files changed, 5 insertions, 5 deletions
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 <time.h>
-#include <stdlib.h>
+#include <stdlib.h>
#include <cmath>
#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
{