Skip to content

Commit

Permalink
time_unix: add zephyr posix time (ros2#368)
Browse files Browse the repository at this point in the history
own implementation allowing to fix error
regarding CLOCK_MONOTONIC definition.

Signed-off-by: Felipe <[email protected]>
  • Loading branch information
Felipe Neves authored and pablogs9 committed Aug 9, 2022
1 parent 0c38019 commit 5ab7164
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/time_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ extern "C"
#include <mach/mach.h>
#endif // defined(__MACH__)
#include <math.h>

#if defined(__ZEPHYR__)
#include <posix/time.h> // Points to Zephyr toolchain posix time implementation
#else
#include <time.h>
#endif // defined(__ZEPHYR__)
#include <unistd.h>

#include "./common.h"
Expand Down

0 comments on commit 5ab7164

Please sign in to comment.