|
|
|
|
|
by robocat
859 days ago
|
|
When synchronising Windows with an external source, you can slowly correct the time using: https://learn.microsoft.com/en-us/windows/win32/api/sysinfoa... Using that API avoids sudden jumps in time. The cost is that if a correction is required then the system time will be incorrect until the difference settles to zero. And you ideally need some PID control so that the system time settles quickly to match the "correct" external time. For example you can spread a 1 second adjustment over an hour. Sometimes being up to one second out is less problem than a sudden jump of one second. It is useful to have time monotonically increasing if you have software that depends on time differences (e.g. timestamps stored in logging systems). Not sure if Microsoft gimped the API after XP - this note seems bad "Currently, Windows Vista and Windows 7 machines will lose any time adjustments set less than 16." Make it difficult to use API to steadily keep time synchronised closely. |
|