Execution time of the particular function
Hi, Is there any tool to find out the execution time of the particular function in qt.
What is your ultimate goal? Do you want to hunt for bottlenecks in your application, or are you actually interested in the time a function took at runtime when the application is on your user’s machine? In the first case, I suggest you use a tool like valgrind instead. In the second case, QTime will do just fine. Just do something like this:
- QTime timer;
- int runtime = timer.elapsed(); //gets the runtime in ms