GetTickCount() is a function in the Windows API that retrieves the number of milliseconds that have elapsed since the computer started. Use this tag if you are having difficulties with this function, or have a question related to GetTickCount()
Questions tagged [gettickcount]
33 questions
0
votes
2 answers
Why is my variable going from 1 to 2 and then back to 1?
I've been creating an idle program to count in minutes when the mouse and keyboard are inactive. This is what I have so far:
using namespace std;
while(true)
{
GetLastInputInfo(&last_info);
tickCount = GetTickCount();
int minutes =…

TriX
- 3
- 4
0
votes
1 answer
Taking snapshot is very slow in Visual Studio2010
I have develop an application which is taking snapshot of DESKTOP at every 1000/30Milliseconds. And application will run for 10 minute. So in 10 minute it should save 18000 snapshot but it is only around 80 snapshots. I am not getting why this is…

Mayank Prabhakar
- 133
- 2
- 6
- 14
-1
votes
1 answer
GetTickCount / Sleep not working? or is it a GetTickCount precision issue?
Checkout the below code:
tick1 = GetTickCount();
Sleep (100);
tick2 = GetTickCount ();
The tick2-tick1 most of times comes less than 100. My expectation is it should always 100+. Is my expectation wrong?

Abhishek Jain
- 9,614
- 5
- 26
- 40