El 26/02/12 17:56, Christoph Bartoschek escribió:
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
I get Runtime: 1.597e-05 in factory and Runtime: 7.00041 in 12.1 Both with kernel 3.3-rcN Aj: looks like there is something wrong in 12.1 glibc. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org