Click to See Complete Forum and Search --> : measuring running time in c++


anmaxp
08-14-2003, 12:24 PM
im working on a university project and need to make some benchmarking apps, but i need to know how can i measure the time the app takes to execute.

i mean, measure the time that goes by from the moment it loads until it finishes all processes and closes as soon as it's done.

what library/commands should i use???


:rolleyes: IT'S MY 100TH POST :rolleyes:
yaaaaaaaaaaaaaaaay :p

Stuka
08-14-2003, 12:29 PM
For 1 second resolution, the time(2) function will work. ftime(3) will give millisecond resolution.

gosam
08-14-2003, 05:21 PM
time -v sh -c "appname"

anmaxp
08-14-2003, 10:41 PM
could someone please give me an example on how to implement ftime() to do this??

i need the output in milliseconds