Mar 14, 2011 at 5:48am
Hello.
Is there a way to count milliseconds, using console applications?
So far, I've been using time_t.
1 2 3 4 5 6 7 8
|
time_t seconds;
int clocker;
time_t seconds2;
seconds = time (NULL);
_getch();
seconds2 = time (NULL);
clocker = (seconds2 - seconds)*1000;
cout << clocker;
|
And the console sees out:
Though, thats too inexact.
Is there a better way to do it?
Thanks!
Edit: Grammar.
Last edited on Mar 14, 2011 at 10:22am