This code will probably be considered very ugly by the more experienced programmers, and it may have no relevance to your issue (I don't know much about your code), but what I meant was, don't limit yourself to just one timer.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
long millisec (int i) //Counts in parts of a second
{
clock_t millisec;
millisec = clock () / (CLOCKS_PER_SEC/i) ;
return millisec;
}
void gotoxy(int x, int y) /* Used for positioning text in console */
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
int main (int argc, char* argv[])
{
while (1)
{
gotoxy (0,0);
printf ("Counting in 100'ths of a second: %Ld\n",millisec(100));
printf ("Another counter, going twice as fast: %Ld\n",millisec(200));
}
return 0;
}
I hope I got that right, seemed to be working right by my watch.