measure time in a function in C

后端 未结 5 2089
南方客
南方客 2021-02-09 17:14

I\'m debugging an C application and I\'d like to know how much time it spends in a particular function.

I could change the source code and add some more code to do the m

5条回答
  •  后悔当初
    2021-02-09 17:32

    If you're using GCC, you want the compile option "-pg" and the application gprof.

提交回复
热议问题