#include #include #define RUNS 1800000 void P(struct timeval *a, struct timeval *b) { int sec=b->tv_sec - a->tv_sec; int usec=b->tv_usec - a->tv_usec; if (usec<0) { usec+=1000000; sec--; } printf("diff = %d:%06d\n", sec, usec); } main() { char stg[30]; int i; struct timeval tv1, tv2, tv3; struct timezone tz; gettimeofday(&tv1, &tz); for(i=0; i