MSDN Forum: Why GetTickcount returns 0 in C ++

Alfacom大西 1 Reputation point
2021-08-19T15:38:02.833+00:00

In Windows Server 2016 standard edition
I am running the developed program (C ++).
I'm using GetTickCount every 30 seconds to get the TickCount value.

① 30 seconds after receiving "2684348122" ms
I got "0" ms when using GetTickCount
Why is this?
Originally, it counts up to 49.7 days, and it is a recognition that you can return that value.

② Continuing from ① above, but when I did GetTickCount again
"30000" ms → 30 seconds later, I got the perfect value for "60000" ms.
Normally, I think it is normal to get a value such as "Example: 30102" ms.
Why are you returning the right value?

Windows development Windows API - Win32
Windows for business Windows Server User experience Other
Developer technologies C++
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.