mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:55:07 -05:00
rtc: optionally return raw time from RTC_Linux_ReadTime*
For use with RCL_AddSample in the incoming RTC reference clock driver,
we'll want access not to the cooked timestamps, but to the raw ones.
Otherwise, the core reference clock code complains:
(valid_sample_time) RTC0 refclock sample time 1721242673.092211891
not valid age=-3.092007
Support both use cases by have the RTC_Linux_ReadTime_* functions take
two nullable pointers, one for cooked and the other for raw time.
This commit is contained in:
committed by
Miroslav Lichvar
parent
a1191f8392
commit
65be9d9a02
@@ -45,8 +45,10 @@ extern void RTC_Linux_CycleLogFile(void);
|
||||
extern int RTC_Linux_SwitchInterrupt(int fd, int on_off);
|
||||
extern int RTC_Linux_CheckInterrupt(int fd);
|
||||
extern time_t RTC_Linux_ReadTimeAfterInterrupt(int fd, int utc,
|
||||
struct timespec *sys_time_cooked);
|
||||
struct timespec *sys_time_cooked,
|
||||
struct timespec *sys_time_raw);
|
||||
extern time_t RTC_Linux_ReadTimeNow(int fd, int utc,
|
||||
struct timespec *sys_time_cooked);
|
||||
struct timespec *sys_time_cooked,
|
||||
struct timespec *sys_time_raw);
|
||||
|
||||
#endif /* _GOT_RTC_LINUX_H */
|
||||
|
||||
Reference in New Issue
Block a user