hi.. i want help for function that can count the time from start function to eand it .. in c++ thr is function but i never use it i want help how can i use it.. thanks
Code: #include <stdio.h> #include <time.h> int main ( ) { time_t t; clock_t start, end; long i,count= 100000000; start = clock(); time(&t); printf(ctime(&t)); printf( "Counting to %ld\n", count ); for (i=0; i < count; i ++); end = clock(); printf( "That took %f seconds and I counted up to %ld", (((double)(end-start)/CLOCKS_PER_SEC)), count ); getchar(); return 0; }