How to measure times in multi-threaded C programs

Asked

Viewed 193 times

3

I’m doing a multi-thread work in c, and I need to calculate the time of a certain part of the program, does anyone have any idea how I can do this?

1 answer

2


Yes, what you want to do has a name, it’s called Profiling. Of a quick read HERE to better understand what this technique means.

This is widely used to improve codes that need to have high performance, little used in real life programmer, but a very interesting technique to know.

Use the tool gprof to do this.

Good luck!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.