X
Xiaopeng Xiong
Hi all,
There are some programs using the clock() function to calculate the elapsed
time by:
//---------------example code----------------------
clock_t starttime=clock();
.......//statements here
clock_t endtime=clock();
double elapsedtime=(double)(endtime-starttime)/CLOCKS_PER_SEC;
//-------------------------------------------
The reference says "The clock function tells how much time the calling
process has used". However I am not sure the elapsedtime here means only the
CPU time or the whole execution time including I/O access. Any help is
appreciated.
Thanks.
Xiaopeng
There are some programs using the clock() function to calculate the elapsed
time by:
//---------------example code----------------------
clock_t starttime=clock();
.......//statements here
clock_t endtime=clock();
double elapsedtime=(double)(endtime-starttime)/CLOCKS_PER_SEC;
//-------------------------------------------
The reference says "The clock function tells how much time the calling
process has used". However I am not sure the elapsedtime here means only the
CPU time or the whole execution time including I/O access. Any help is
appreciated.
Thanks.
Xiaopeng