From 318499f56e10b749c33d91c1b19266e34ea41b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Sun, 6 Jan 2019 08:12:50 +0100 Subject: [PATCH] lockstep_scheduler: inline get_absolute_time() This is a small method that is used a lot. --- .../include/lockstep_scheduler/lockstep_scheduler.h | 2 +- .../posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/platforms/posix/src/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h b/platforms/posix/src/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h index 4ecb71335e..84c0e04f07 100644 --- a/platforms/posix/src/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h +++ b/platforms/posix/src/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h @@ -11,7 +11,7 @@ class LockstepScheduler { public: void set_absolute_time(uint64_t time_us); - uint64_t get_absolute_time() const; + inline uint64_t get_absolute_time() const { return time_us_; } int cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *lock, uint64_t time_us); int usleep_until(uint64_t timed_us); diff --git a/platforms/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp b/platforms/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp index 14afbed9f0..f9a965d096 100644 --- a/platforms/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp +++ b/platforms/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp @@ -1,11 +1,6 @@ #include "lockstep_scheduler/lockstep_scheduler.h" -uint64_t LockstepScheduler::get_absolute_time() const -{ - return time_us_; -} - void LockstepScheduler::set_absolute_time(uint64_t time_us) { time_us_ = time_us;