/* a sample program that displays the current execution time. */ #include #include void elapsed_time(void); int main() { int i; clock(); // first call clock for(i = 0; i<1000;i++) {}; elapsed_time(); } void elapsed_time(void) { printf("Elapsed time: %d microsecs.\n", clock()); // return the time between first call // and this call . }