Feature Request
Current Approach:
I'm running zephyr native sim on lockstep with a robotics simulator "Gazebo". Currently I'm just disabling the realtime feature and then polling on on ringbuf is_empty using nanosleep to sleep the thread every millisecond.
Requested Feature:
It would be great if there was an external clock api where the zephyr cpu could be paused until I tell it to run until it reaches a given timestamp. Something like:
#ifdef CLOCK_EXTERNAL
nsi_run_until(struct timespec tv) {
...
}
#endif
Usecase:
- simulator sends current clock time and data via UDP to zephyr (zephyr model cpu is paused)
- posix native thread receives clock and data and buffers data to send to zephyr thread (ring buf, msg queue)
- (zephyr model cpu is unpaused) posix native thread runs scheduler until the boot time matches the sim time
- process repeats when next external clock message from UDP is received
Feature Request
Current Approach:
I'm running zephyr native sim on lockstep with a robotics simulator "Gazebo". Currently I'm just disabling the realtime feature and then polling on on ringbuf is_empty using nanosleep to sleep the thread every millisecond.
Requested Feature:
It would be great if there was an external clock api where the zephyr cpu could be paused until I tell it to run until it reaches a given timestamp. Something like:
Usecase: