Hi there,
I am trying to write some tests to see how long my function takes to execute different inputs. I have :
But even if I give large input, the start/finish time always seem to be the same. I was wondering if there was a more accurate/effecive way in testing a function's execution time.
I am trying to write some tests to see how long my function takes to execute different inputs. I have :
Code:
clock_t start, finish;
start = clock();
function1 (input1, input2);
finish = clock();
printf ("start: %d end: %d\n", start, finish);
But even if I give large input, the start/finish time always seem to be the same. I was wondering if there was a more accurate/effecive way in testing a function's execution time.