I wish to assess the speed performance of some C++ code, thus enabling me to establish what the 'bottlenecks' are in the system.

Can anybody advise me on the best way to do this? I am not too familiar with C++ but I am thinking of inserting get system time commands into the code. Each of these commands will assign the time values to variables, or an array. After which i will then be able to do some calculations and assess the times of each section.

What is the most accurate command to use to get the system time?

Will the get system time commands affect the speed of the code too much?

Thank You