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...
TSC is in fact munged by dual or quad core systems, and also by power-saving features that change the CPU clock rate. In any event I'm not convinced your inline assembly is working, being raw hex there. I've found some source here with perhaps a better implementation:
You may need to change 'long long' to just 'long' on 64-bit systems. Or better yet, #include <stdint.h> and use uint64_t for code that should work on both...
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
2. 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
3. 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
4. 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
5. 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
6. 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
7. Forum Support Area for Unregistered Users & Account Problems
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)