michallenc commented on issue #8858: URL: https://github.com/apache/nuttx/issues/8858#issuecomment-1493788770
> adjtime() does depend on the architecture-specific code providing interfaces to adjust the clock rate, so perhaps it would need to depend on CONFIG_ARCH_HAVE_TIMEKEEPING @patacongo That is the current state. I just changed it that adjtime() would depend on CONFIG_ARCH_HAVE_ADJTIME and CONFIG_CLOCK_ADJTIME. Mostly because current timekeeping implementation does not use traditional basetime structure ``` #ifndef CONFIG_CLOCK_TIMEKEEPING struct timespec g_basetime; #endif ``` As can be seen here https://github.com/apache/nuttx/blob/master/sched/clock/clock_initialize.c#L58. Therefore there is a different aproach for settime and gettime. I think maybe we should keep the implementation of adjtime (under CONFIG_CLOCK_ADJTIME) and other timekeeping function (wall time etc. under CONFIG_CLOCK_TIMEKEEPING) separately. This way it will be possible to use adjtime just for clock period adjustment when required by the user. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org