I only have limited experiance in C++, but I know quite a bit about timing mechanisms from some programming I have done for automotive performance testing. I read into this for only about 2 min, and this is a very simple thing to implement. In a nutshell, here is the theory behind it, and how to make it work for you.
The function GetTickCount() returns a value that represents the number of milliseconds (.001 sec) since your computer has been turned on. The use of this would be for a timing mechanism. Other languages have similar functions, but are harder to implement because you have to find or calulate the length of each tick. C++ is very easy because we know each tick is exactly 1 ms. You will need a static variable or a public variable--anything capable of holding the value of the "Start Time." Then when you are ready to stop the timer, you just compare the start time to the finish time.
So when you want the timer to start, call something like:
unsigned long StartTime = GetTickCount();
This will set the start time to the number of "ticks" (ms) that have elapsed since you booted the machine. Once you are ready to end the timer, you call another line similar to that to record and end time, then you can compare the values to determine the difference. This isn't a very efficient use of variables, but here is an example you should be able to follow.
unsigned long EndTime = GetTickCount();
unsigned long TimerValMS = EndTime - StartTime; // time in ms
float TimerValSec = TimerValMS / 1000; // convert to sec
If you're going to be using this in games, here is another example you may find useful. We will calculate the FPS of the display for the game. To do this, we will get the tick count each time we draw the screen, and calculate the difference to determine the FPS. The static variable will hold the ticks from the last pass through of drawing the screen so the first number it gives us is garbage. A simple IF statment can be used to get around that, and I will leave it up to you to figure out if it is necessary and how to do it. You will want to use this code at the end of the drawing function of your program loop (old school) or refresh function. The variable Interval will hold the value of ticks passed since the screen was last updated, and FPS will hold the value of calculated FPS.
static unsigned long LastTickCount; // define LastTickCount
unsigned long CurrentTickCount = GetTickCount(); // get current time
unsigned long Interval = CurrentTickCount - LastTickCount; // calculate ticks past since last iteration
float FPS = 1000 / Interval; // calculate FPS
LastTickCount = CurrentTickCount; // prepare LastTickCount for next iteration
The variable FPS holds the info you want, so you can stick it in the corner of the screen or create some mechanism to log it down somewhere for future reference. That should get you going.
Good Luck!