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: <>

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


consider the following program:

#include <iostream>

extern "C" {
#include <time.h>

int main() {
struct timespec start, stop;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start);
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

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >