5

In this discussion it is said that Windows re-reads CMOS RTC approximately every hour. Is there an API in Windows to re-read date/time from CMOS RTC immediately?

In other words: running a multi-OS machine, there is a need to instruct Windows: "CMOS contents has changed (by another OS running in parallel on the same machine). Please re-read time from it". Is there a standard API for that?

Here is the function that does the job in RTOS-32.

In GNU/Linux, the equivalent action is: hwclock --hctosys

In QNX Neutrino, the command is: rtc hw

ymz5
  • 61
  • 2
  • Do you wish to get the time itself directly, or do you wish Windows to update its own clock on demand? (I don't know if either is possible, but it's important to know the difference) – Mark Ransom Feb 01 '17 at 16:29
  • Preferably, in one atomic operation: CMOS time → Windows system time. But two separate calls would also suffice, of course. – ymz5 Feb 01 '17 at 16:56
  • You know that Windows usually syncs to a server that's much more accurate than the CMOS clock, right? – Mark Ransom Feb 01 '17 at 18:19
  • 1
    Right. But the problem has nothing to do with time synchronization (and my machine isn't connected to internet anyway). – ymz5 Feb 02 '17 at 09:21

0 Answers0