On 3/20/2023 5:15 PM, Gregory Nutt wrote:
You wouldn't really do this from application level, right? There is currently no POSIX-compatible application interface to do that.

There is no /POSIX /interface to do this, but the Linux interface adjtime() -- see https://man7.org/linux/man-pages/man3/adjtime.3.html -- is implemented in sched/clock/clock_timekeeping.c

https://github.com/apache/nuttx/blob/master/sched/clock/clock_timekeeping.c#L142

Linux application interfaces are acceptiable.  adjtime() is not properly configured as an OS interface; it would need system call hooks in syscall/ and include/sys in order to be usable in all build configurations.

It is not very sophisticated and could do so much more. Currently it calculates a clock adjustment that gets added to the system time.

Reply via email to