Measurement of time in c++ code