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
Put this into your ~/.gdbinit
define timeme
python import time
python starttime=time.time()
next
python print("Previous takes: " + (str)(time.time()-starttime) + "s")
end
document timeme
Measure executing time of next function
Usage: timeme or ti
end
type timeme
or ti
when you want to measure the time of next function.