Code: Select all
ElapsedTime.h:60:7: error: missing binary operator before token "1000000"
#if CLOCKS_PER_SEC >= 1000000
^
Code: Select all
diff -u -r1.10 ElapsedTime.h
--- src/client/c/unix/ElapsedTime.h 4 May 2015 18:18:10 -0000 1.10
+++ src/client/c/unix/ElapsedTime.h 22 Sep 2016 14:06:59 -0000
@@ -56,11 +56,7 @@
now -= start_clock;
lap_cpu.tv_sec = now / CLOCKS_PER_SEC;
- #if CLOCKS_PER_SEC >= 1000000
- lap_cpu.tv_usec = (now % CLOCKS_PER_SEC) / (CLOCKS_PER_SEC / 1000000);
- #else
- lap_cpu.tv_usec = (now % CLOCKS_PER_SEC) * (1000000 / CLOCKS_PER_SEC);
- #endif
+ lap_cpu.tv_usec = now % CLOCKS_PER_SEC;
}
void stop() {
@@ -72,11 +68,7 @@
now -= start_clock;
lap_cpu.tv_sec = now / CLOCKS_PER_SEC;
- #if CLOCKS_PER_SEC >= 1000000
- lap_cpu.tv_usec = (now % CLOCKS_PER_SEC) / (CLOCKS_PER_SEC / 1000000);
- #else
- lap_cpu.tv_usec = (now % CLOCKS_PER_SEC) * (1000000 / CLOCKS_PER_SEC);
- #endif
+ lap_cpu.tv_usec = now % CLOCKS_PER_SEC;
add(cumm_cpu, lap_cpu);
}