26 Feb
2012
26 Feb
'12
20:56
Hi, consider the following program: #include <iostream> extern "C" { #include <time.h> } int main() { struct timespec start, stop; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); sleep(7); clock_gettime(CLOCK_THREAD_CPUTIME_ID, &stop); std::cout << "Runtime: " << ((stop.tv_sec - start.tv_sec) + 1e-9*(stop.tv_nsec - start.tv_nsec)) << "\n"; } On Opensuse 12.1 this prints about 14 seconds. On Ubuntu or RHEL I get something around 1e-5 as expected. Is this a bug in the glibc shipped with Opensuse 12.1? Christoph -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org