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 Sep 22, 2022
1 parent acb6164 commit e4aac4e
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 e4aac4e

Please sign in to comment.