Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 291206 Details for
Bug 428196
CLOCKS_PER_SECOND clearly is not
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
program that uses CPU for a specified amount of time and prints tms_utimes divided by CLOCKS_PER_SECOND
ttest.c (text/plain), 536 bytes, created by
Scott Mcdermott
on 2008-01-09 21:38:33 UTC
(
hide
)
Description:
program that uses CPU for a specified amount of time and prints tms_utimes divided by CLOCKS_PER_SECOND
Filename:
MIME Type:
Creator:
Scott Mcdermott
Created:
2008-01-09 21:38:33 UTC
Size:
536 bytes
patch
obsolete
>#define _GNU_SOURCE > >#include <sys/times.h> > >#include <stdio.h> >#include <time.h> >#include <signal.h> > >volatile int keepgoing = 1; > >void >handle_alarm (int ignored) >{ > keepgoing = 0; >} > >int >main (int argc, > char **argv) >{ > int i; > struct tms start, end; > unsigned long delta; > > alarm(strtoul(*++argv, NULL, 0)); > signal(SIGALRM, handle_alarm); > > times(&start); > for (i = 0; keepgoing; i++); > times(&end); > > delta = end.tms_utime - start.tms_utime; > printf("raw delta: %lu, secs: %d\n", delta, delta / CLOCKS_PER_SEC); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 428196
: 291206 |
291219