[EXPLORER] CTrayClockWnd::CalculateDueTime(): Fix uiDueTime value

when showing seconds.
This commit is contained in:
Serge Gautherie 2020-01-24 04:41:00 +01:00 committed by Giannis Adamopoulos
parent 8cf3cff27c
commit e45b15aca2

View file

@ -424,12 +424,9 @@ UINT CTrayClockWnd::CalculateDueTime()
{
UINT uiDueTime;
/* Calculate the due time */
GetLocalTime(&LocalTime);
uiDueTime = 1000 - (UINT) LocalTime.wMilliseconds;
if (g_TaskbarSettings.bShowSeconds)
uiDueTime += (UINT) LocalTime.wSecond * 100;
else
if (!g_TaskbarSettings.bShowSeconds)
uiDueTime += (59 - (UINT) LocalTime.wSecond) * 1000;
if (uiDueTime < USER_TIMER_MINIMUM || uiDueTime > USER_TIMER_MAXIMUM)