[SYSSETUP][TIMEDATE] Use exact setTimer() timeouts, to stay in sync (#3355)

CORE-13121
This commit is contained in:
Serge Gautherie 2021-03-21 04:01:22 +01:00 committed by GitHub
parent 53005587f4
commit 4cd92f0d01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 27 deletions

View file

@ -429,15 +429,6 @@ UINT CTrayClockWnd::CalculateDueTime()
if (!g_TaskbarSettings.bShowSeconds)
uiDueTime += (59 - (UINT) LocalTime.wSecond) * 1000;
if (uiDueTime < USER_TIMER_MINIMUM || uiDueTime > USER_TIMER_MAXIMUM)
uiDueTime = 1000;
else
{
/* Add an artificial delay of 0.05 seconds to make sure the timer
doesn't fire too early*/
uiDueTime += 50;
}
return uiDueTime;
}