Mailinglist Archive: opensuse-bugs (3393 mails)

< Previous Next >
[Bug 749126] New: clock_gettime broken
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 27 Feb 2012 15:31:27 +0000
  • Message-id: <bug-749126-21960@http.bugzilla.novell.com/>

https://bugzilla.novell.com/show_bug.cgi?id=749126

https://bugzilla.novell.com/show_bug.cgi?id=749126#c0


Summary: clock_gettime broken
Classification: openSUSE
Product: openSUSE 12.1
Version: Final
Platform: Other
OS/Version: Other
Status: NEEDINFO
Severity: Major
Priority: P5 - None
Component: Basesystem
AssignedTo: aj@xxxxxxxx
ReportedBy: aj@xxxxxxxx
QAContact: qa@xxxxxxx
InfoProvider: maintenance@xxxxxxxxxxxx
Found By: Product Management
Blocker: ---


From http://lists.opensuse.org/opensuse/2012-02/msg01307.html

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.

Mr. Maintenance, I have a fixed glibc for this. May I submit to the update
repo?

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >