I'm accessing the TSC register, and using usleep() function to calculate my clock frequency. Basically, I check the current clock, delay for 1 second, and then check the clock again to discover how many clock ticks occur in a second.
The only problem is - my result turns out to be a ridiculous (and inconsistent) number. It always very close to one of the two following numbers.
18446744072127.2 Mhz or 2712.6 Mhz
My question - Is this a result of having a multi-core processor? Or is my code/logic just plain wrong? I included the relevant sections of the code below.
Last edited by pludi; 02-10-2010 at 09:38 AM..
Reason: code tags, please...
I tried registering, but no matter what email address I provide, it says not a valid address and not the same in confirm. I tried many times, but no go. I thought I had already registered as Sully but even that didn't like my email address for password info. Of course, that could be someone else... (2 Replies)
Discussion started by: Not registered
2 Replies
2. Forum Support Area for Unregistered Users & Account Problems
Registration denied. Sorry, The UNIX and Linux Forums runs an active policy of not allowing spammers. Please contact us via by posting in this forum if you believe this is in error
What's with this?
Tried 2 email accounts in case your forum blocks either. (1 Reply)
Discussion started by: Diagonal
1 Replies
4. Forum Support Area for Unregistered Users & Account Problems
I need help from the scripting threads and want to register.
I tried it several times, but I was all the time rejected, because of your spam policy.
I do what you have written, but I wasn't still able to register. (1 Reply)
Discussion started by: ScAr
1 Replies
5. Forum Support Area for Unregistered Users & Account Problems
Hello admin,
I come from Vietnam, it's in blocked country list. Can you help me to register
I want to register with following information:
Username: bojankikrick
Email: <removed>
Thanks very much! (1 Reply)
Discussion started by: Unregistered
1 Replies
6. Forum Support Area for Unregistered Users & Account Problems
hi,admin:
i come from china,my country is in the blocked list.i want to register a account,can you help me?
infomation:
username: zhengzfand
email:<removed> (1 Reply)
Discussion started by: Unregistered
1 Replies
7. Forum Support Area for Unregistered Users & Account Problems
I am in China.
China is in the blocked country list.
I can't register.
And I don't have a static ip.
Can u help me to fix it.
I want to register with following information:
Username:liuchengzhang
email:<removed>
Thanks! (1 Reply)
Discussion started by: liuchengzhang
1 Replies
8. Forum Support Area for Unregistered Users & Account Problems
Hi Admin,
I am unable to register .
Request you to help me in getting my registration done.
Name: Raghavendra Kulkarni
Mail id : <removed>
Thanking you in advance for your support. (1 Reply)
Discussion started by: Unregistered
1 Replies
LEARN ABOUT PHP
drv_usectohz
drv_usectohz(9F) Kernel Functions for Drivers drv_usectohz(9F)NAME
drv_usectohz - convert microseconds to clock ticks
SYNOPSIS
#include <sys/types.h>
#include <sys/ddi.h>
clock_t drv_usectohz(clock_t microsecs);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
microsecs The number of microseconds to convert.
DESCRIPTION
drv_usectohz() converts a length of time expressed in microseconds to a number of system clock ticks. The time arguments to timeout(9F)
and delay(9F) are expressed in clock ticks.
drv_usectohz() is a portable interface for drivers to make calls to timeout(9F) and delay(9F) and remain binary compatible should the
driver object file be used on a system with a different clock speed (a different number of ticks in a second).
RETURN VALUES
The value returned is the number of system clock ticks equivalent to the microsecs argument. No error value is returned. If the clock
tick equivalent to microsecs is too large to be represented as a clock_t, then the maximum clock_t value will be returned.
CONTEXT
drv_usectohz() can be called from user or interrupt context.
SEE ALSO delay(9F), drv_hztousec(9F), timeout(9F)
Writing Device Drivers
SunOS 5.10 12 Nov 1992 drv_usectohz(9F)