ssy99 f280a71488 feat: 최초 커밋
기존 프로그램 업로드
2025-04-30 16:11:21 +09:00

46 lines
1.3 KiB
VB.net

Module TimeKernalModule
Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Integer
Public Const MeasStart As Boolean = True
Public Const MeasEnd As Boolean = False
Public Function MeasureTime(StartEnd As Boolean) As Long
Static Dim nStartTick As Long
Static Dim nEndTick As Long
If StartEnd = MeasStart Then
nStartTick = GetTickCount()
Return 0
Else
nEndTick = GetTickCount()
Return (nEndTick - nStartTick)
End If
End Function
Public Function MeasureTimeFunc(StartEnd As Boolean) As Long
Static Dim nStartTick As Long
Static Dim nEndTick As Long
If StartEnd = MeasStart Then
nStartTick = GetTickCount()
Return 0
Else
nEndTick = GetTickCount()
Return (nEndTick - nStartTick)
End If
End Function
Public Function MeasureTimeAll(StartEnd As Boolean) As Long
Static Dim nStartTick As Long
Static Dim nEndTick As Long
If StartEnd = MeasStart Then
nStartTick = GetTickCount()
Return 0
Else
nEndTick = GetTickCount()
Return (nEndTick - nStartTick)
End If
End Function
End Module