On Monday, February 27, 2012 09:30:37 Andreas Jaeger wrote:
On Sunday, February 26, 2012 21:56:04 Christoph Bartoschek wrote:
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?
Seems to be. Could you file a bugreport using http://bugzilla.novell.com and assign the bug to me (aj@suse.com)? I'll look into it and will release a new glibc for 12.1 - but first need the bugreport ;)
Andreas
I filed a bug myself now: https://bugzilla.novell.com/show_bug.cgi?id=749126 Test package will soon be available at: http://download.opensuse.org/repositories/home:/a_jaeger:/branches:/openSUSE... Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org