I decided to add an Timer in that runs in the background, and gives the user the Time they took at the end.
This is the format of my Timer:
1 2 3 4 5 6 7 8
void Timer (void*)
{
while(TimerOn) //TimerOn is a Global Variable of Type bool.
{
TotalTime += 1; //Another global variable of type int.
Sleep(1);
}
}
I added void* in the parameter list to make it compatible with the pointer with the pointer in the _beginthread function from <process.h>.
Now What I wanted to know is whether this is an effective method to get the time in Milliseconds?
What are operator Synonyms?
Googling gives me Synonyms for Operator!!!
EDIT:
There is a problem here though.
The same one I had when using ctime.
The problem is that the times starts the moment you run the program.
That was why I decided to use the above method. Any workaround for that?