Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 4967 Details for
Bug 9600
sysconf(_SC_CLK_TCK) reports 100 when HZ=1000
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
illustrates the problem
foo.cc (text/plain), 702 bytes, created by
Denys Duchier
on 2002-10-24 07:15:42 UTC
(
hide
)
Description:
illustrates the problem
Filename:
MIME Type:
Creator:
Denys Duchier
Created:
2002-10-24 07:15:42 UTC
Size:
702 bytes
patch
obsolete
>#include <iostream> >#include <unistd.h> >#include <sys/times.h> >#include <sys/time.h> >#include <unistd.h> > >int main() >{ > struct tms buf; > struct timeval begin; > struct timeval end; > clock_t tck_begin; > clock_t tck_end; > (void) gettimeofday(&begin,NULL); > tck_begin = times(&buf); > (void) usleep(5000000); > tck_end = times(&buf); > (void) gettimeofday(&end,NULL); > > std::cerr << "according to gettimeofday: " > << (end.tv_sec-begin.tv_sec)*1000 + (end.tv_usec-begin.tv_usec)/1000 > << std::endl > << "according to ticks: " > << (tck_end-tck_begin)*1000/sysconf(_SC_CLK_TCK) > << std::endl > << "sysconf(_SC_CLK_TCK)=" << sysconf(_SC_CLK_TCK) > << std::endl; > > 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 9600
: 4967