Indigo Rose Software
  #1  
Old 11-07-2003
TJ_Tigger's Avatar
TJ_Tigger TJ_Tigger is offline
Indigo Rose Customer
 
Join Date: Sep 2002
Location: Sol 3
Posts: 3,188
Processor speed

Is there a way to determine the processor speed your project is running on? The reason for asking is I am looking at timed events, and with the timer set to three seconds, a fast machine is able to do the processing I want to do within that three seconds and display back to the user. When run on a slower processor it takes longer to process the actions and the display is shown for a shorter period of time before it moves on to the next. Three seconds is still three seconds, but the other actions inbetween those three seconds takes longer. So I was wondering if one could determine the processor speed and pad the timer with additional seconds for a slower processor to give the same effect.

I was also thinking about starting and stopping the timer each time as well, but didn't like that solution as well.

Tigg
Reply With Quote
  #2  
Old 11-07-2003
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\ 0\ProcessorNameString
Reply With Quote
  #3  
Old 11-07-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Cool! This is handy when deploying video for sure as well as a few other things...

Corey Milner
Creative Director, Indigo Rose Software
Reply With Quote
  #4  
Old 11-07-2003
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
The better key to go off would be ~MHz

But you'll have to do the HEX to Decimal conversion.
If you need help with that, let me know.
Reply With Quote
  #5  
Old 11-07-2003
TJ_Tigger's Avatar
TJ_Tigger TJ_Tigger is offline
Indigo Rose Customer
 
Join Date: Sep 2002
Location: Sol 3
Posts: 3,188
Thanks

I will take it from here.
Reply With Quote
  #6  
Old 11-07-2003
TJ_Tigger's Avatar
TJ_Tigger TJ_Tigger is offline
Indigo Rose Customer
 
Join Date: Sep 2002
Location: Sol 3
Posts: 3,188
Actually when I get the Registry value it returns in decimal not Hex. But I did find some LUA code that will convert Hex to Decimal. Here is what I did.

processorspeed_hex = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\ 0\\", "~MHz", true);
processorspeed_dec = tonumber(processorspeed_hex , 16);
Dialog.Message("Processor Speed", processorspeed_hex .. "\r\n" .. processorspeed_dec, MB_OK, MB_ICONNONE, MB_DEFBUTTON1);

This is the LUA code for converting Hex to Dec

DecimalValue = tonumber(HexString, 16)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software