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@suse.com
ReportedBy: aj@suse.com
QAContact: qa@suse.de
InfoProvider: maintenance@opensuse.org
Found By: Product Management
Blocker: ---
From http://lists.opensuse.org/opensuse/2012-02/msg01307.html
consider the following program:
#include <iostream>
extern "C" {
#include
}
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.