Clock in milliseconds
Hi, im writing a program that needs the real time (the one u see at the bottom right of the screen) in milliseconds. So if its 10:51 AM it would return whatever ((10*60)*60)*1000+(51*60)*1000 is. I looked at the tutorial but wasnt sure how I could get the time.
Im using windows XP and vs.net Dos would be great but not required
GetTickCount returns milliseconds, its got a +/- 10 millisecond
google the function to figure out how to apply it to
my program looks like this.
DWORD time = GetTickCount();
cout << "Time: " << time << endl ;
which is 265,014,671
at about 12:00 AM.
According to my calculatoions. 12 AM is 43,200,000
Is there something im doing wrong?
Starting from what though? The beginning of the day? When the computer was turned on? Program start? If you turn a computer on at exactly 11:59, then 12:00 should return 1000 milliseconds. But if it's turned on at 8:00 then at 12:00 it should return (60*(60*1000))*4 = a very large amount of milliseconds(from point of view of how much time passed by since computer start).
Ah ........!, ok thnx. I need to find out how to get the time in milliseconds. Like right now its 12:56. How do I detect that ?
SYSTEMTIME GetSystemTime GetLocalTime Never really tried this for milliseconds though it looks like their stored. Sorry for replying to C++, just following the thread.