micro-ROS / micro_ros_platformio

micro-ROS library for Platform.IO
Apache License 2.0
225 stars 80 forks source link

timer: proper way to check POSIX timers support #136

Closed hippo5329 closed 6 months ago

hippo5329 commented 6 months ago

The _POSIX_TIMERS macros can be used to determine the degree of a host's support for the posix timers API.

The POSIX definition (2018 edition) says that:

_POSIX_TIMERS

The implementation supports timers. This symbol shall always be set to the value 200809L.

It's defined in the header.

Tested on esp32, pico and teensy4.