+ //clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts); // DONT works (original)
+ //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); // DONT works
+ //clock_gettime(CLOCK_MONOTONIC, &ts); // works
+ // Note that CLOCK_MONOTONIC is subject to discontinuities from system time
+ // adjustment in Linux. CLOCK_MONOTONIC_RAW was defined to get around this
+ // (gets hardware time not adjusted by NTP).
+ clock_gettime(CLOCK_MONOTONIC_RAW, &ts); // works
+