If you want to measure how long the whole program works, then Code-Blocks / Visual studio should tell when the program closes. It should be in the journal below.
If you want to measure how long it takes for a particular line or function, I would suggest researching clock() or QueryPerformanceFrequency() and how to use them.
The clock() function is slow, but easier to use. example:
float start_time = clock()/CLOCKS_PER_SEC; func(); float end_time = clock()/CLOCKS_PER_SEC; float dtime = start_time - end_time;
source share