what function/header files...
#include <ctime>

clock() will return the number of "counts" (since your program started).
CLOCKS_PER_SEC is a system-specific constant for the number of "counts" per second. CLOCKS_PER_SEC is often equal to 1000, which means that clock() is already in milliseconds! But, don't count on that... write good (portable) code!

There is some information in the Programming FAQ.

Be aware of a "gotcha" with Windows: clock() will count in milliseconds, but the time_t structure is NOT updated every-single-millisecond by the OS. It jumps in...oh, I forget... something like 30 ms steps. There are other functions (in <windows>) that are more accurate... I think... GetClockTick() ...maybe GetClockCount() ???