P
Pasacco
dear
I need to know the execution time of the program. Below is just an
example. I used to use gprof. But in this case, the error messsage says
"gprof : gmon.out file is missing call-graph data".
Is it possible to 'gprof' with this ? Or it will be nice if someone
introduce how to measure execution time......
Thankyou for comment.
-------------------------------------------------------
/* http://www.cplusplus.com/ref/cstdlib/qsort.html */
/* qsort example */
#include <stdio.h>
#include <stdlib.h>
int values[] = { 40, 10, 100, 90, 20, 25 };
int compare (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int main ()
{
int * pItem;
int n;
qsort (values, 6, sizeof(int), compare);
for (n=0; n<6; n++)
{
printf ("%d ",values[n]);
}
return 0;
}
I need to know the execution time of the program. Below is just an
example. I used to use gprof. But in this case, the error messsage says
"gprof : gmon.out file is missing call-graph data".
Is it possible to 'gprof' with this ? Or it will be nice if someone
introduce how to measure execution time......
Thankyou for comment.
-------------------------------------------------------
/* http://www.cplusplus.com/ref/cstdlib/qsort.html */
/* qsort example */
#include <stdio.h>
#include <stdlib.h>
int values[] = { 40, 10, 100, 90, 20, 25 };
int compare (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int main ()
{
int * pItem;
int n;
qsort (values, 6, sizeof(int), compare);
for (n=0; n<6; n++)
{
printf ("%d ",values[n]);
}
return 0;
}