#include #include #include #include int main(int argc, char **argv) { struct timeval before, after; double x = 1; int i; int max; if (argc == 1) max = 100000; else max = atoi(argv[1]); gettimeofday(&before, NULL); for (i = 0; i < max; i++) { x *= 3.412312; x /= 23423423.23; } gettimeofday(&after, NULL); printf("%ld.%ld\n", after.tv_sec - before.tv_sec, after.tv_usec - before.tv_usec); return 0; }