📄 moduleap1.bas
字号:
Attribute VB_Name = "ModuleAp1"
Public Type LARGE_INTEGER
lowpart As Long
highpart As Long
End Type
'2^32=4294967296
Public Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As LARGE_INTEGER) As Long
Public Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As LARGE_INTEGER) As Long
Public HSFrequency As LARGE_INTEGER
Public lp1PerformanceCount As LARGE_INTEGER
Public lp2PerformanceCount As LARGE_INTEGER
Public tempTst As Integer
Public nhsc As Long
Public lpFrequency As Variant
Public P1CValue As Double
Public P2CValue As Double
Public HSfreqValue As Double
Public dint1 As Double
Public Function cnvLARGE_INTEGER(lpNPerformanceCount As LARGE_INTEGER) As Double
Dim P1C As LARGE_INTEGER 'Long
Dim P2C As LARGE_INTEGER
Dim P1cLH As Long
Dim P1cLL As Long
Dim P2cLH As Long
Dim P2cLL As Long
Dim P1cD As Double
Dim P1cDL As Double
Dim P1cDH As Double
Dim P2cD As Double
P1cLH = lpNPerformanceCount.highpart
P1cLL = lpNPerformanceCount.lowpart
If P1cLL < 0 Then
P1cDL = 4294967296# + P1cLL
Else
P1cDL = P1cLL
End If
P1cD = P1cLH * 4294967296# + P1cDL
cnvLARGE_INTEGER = P1cD
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -