mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
lockstep_scheduler: inline get_absolute_time()
This is a small method that is used a lot.
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ class LockstepScheduler
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void set_absolute_time(uint64_t time_us);
|
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 cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *lock, uint64_t time_us);
|
||||||
int usleep_until(uint64_t timed_us);
|
int usleep_until(uint64_t timed_us);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
#include "lockstep_scheduler/lockstep_scheduler.h"
|
#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)
|
void LockstepScheduler::set_absolute_time(uint64_t time_us)
|
||||||
{
|
{
|
||||||
time_us_ = time_us;
|
time_us_ = time_us;
|
||||||
|
|||||||
Reference in New Issue
Block a user