Loading cube-test.c +6 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ read_number() { if (!fgets(buf, sizeof buf, stdin)) { return 0; } buf[9] = 0; return atoi(buf); } Loading Loading @@ -80,9 +81,11 @@ main(int argc, char *argv[]) { guess = read_number(); delta = end_timer(&timer); if (guess == 0) { if (iterations) { printf("Got %d correct out of %d.\n", correct, iterations); printf("Average time to answer was %s\n", humanize_usec(delta_total / iterations)); } exit(0); } iterations++; Loading Loading
cube-test.c +6 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ read_number() { if (!fgets(buf, sizeof buf, stdin)) { return 0; } buf[9] = 0; return atoi(buf); } Loading Loading @@ -80,9 +81,11 @@ main(int argc, char *argv[]) { guess = read_number(); delta = end_timer(&timer); if (guess == 0) { if (iterations) { printf("Got %d correct out of %d.\n", correct, iterations); printf("Average time to answer was %s\n", humanize_usec(delta_total / iterations)); } exit(0); } iterations++; Loading