Hello everyone,
What is the convenient way to calculate the execution time of a function? The function may be not a long and time consuming function -- only 10 lines in some situation.
thanks in advance,
George
Hello everyone,
What is the convenient way to calculate the execution time of a function? The function may be not a long and time consuming function -- only 10 lines in some situation.
thanks in advance,
George
use gettimeofday() - which can return time in microseconds, before the start and the end of function.
Which OS and compiler are you using George2 ?
Also, which processor is your final program running on (if it's not your host machine)
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.