rtc: factor out RTC_Linux_ReadTimeAfterInterrupt

We have code to read time after an RTC's UIE interrupt, which we
currently use as part of maintaining the correction file.

In a later commit, we will need the same functionality for using the RTC
as reference clock, so export the function and give it a descriptive
name appropriate for a globally visible function.
This commit is contained in:
Ahmad Fatoum
2024-07-17 13:00:39 +02:00
committed by Miroslav Lichvar
parent 8028984f34
commit 924199ef69
2 changed files with 26 additions and 14 deletions

View File

@@ -44,5 +44,7 @@ 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);
#endif /* _GOT_RTC_LINUX_H */