|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\ 0\ProcessorNameString
|
|
#3
|
||||
|
||||
|
Cool! This is handy when deploying video for sure as well as a few other things...
Corey Milner Creative Director, Indigo Rose Software |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
||||
|
||||
|
Thanks
I will take it from here. |
|
#6
|
||||
|
||||
|
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) |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 10:50 PM.








Linear Mode
