Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
How fast is my processor? This code snippet ret...
Author:
Duncan Jones
E-mail:
Click to e-mail author
Submitted:
8/7/2001
Version:
VB4
Compatibility:
VB4, VB5, VB6
Category:
Windows API
Views:
13392
How fast is my processor? This code snippet returns the processor clock speed - useful in games programming and also a nice addition if you are displaying system info.
Declarations:
Private Declare Function QueryPerformanceFrequency Lib "kernel32.dll" (lpFrequency As Long) As Long
Code:
Public Function ProcessorFrequency() As Long Dim lRet As Long Dim lFrequency As Long lRet = QueryPerformanceFrequency(lFrequency) If Err.LastDllError <> 0 Then Debug.Print "Error getting processor frequency - " & err.lastDllError Else ProcessorFrequency= lFrequency End If End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement