mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 15:30:25 +08:00
e874561291
macOS does not provide full POSIX timer support for the host-side simulator build, so references to timer_t and timer_create can fail when building sim:fb on Apple hosts. Replace the POSIX timer path with a Grand Central Dispatch timer on macOS while keeping the existing POSIX implementation for other hosts. The dispatch timer raises SIGALRM from its event handler so the host side keeps the same timer-driven behavior expected by the simulator. This preserves the existing timing model and fixes the macOS host build failure for sim:fb. Signed-off-by: Peter Bee <bijunda@bytedance.com>