Created
March 16, 2012 05:25
-
-
Save nobrinskii/2048634 to your computer and use it in GitHub Desktop.
[vba/excel] 実行時間時間計測関連
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'############################################################################## | |
'実行時間時間計測関連 | |
'############################################################################## | |
'ForDebug---------------------------------------------------------------------- | |
'時間計測 | |
Dim timeStart As Date | |
Dim timeEnd As Date | |
timeStart = Time$ | |
'ForDebug---------------------------------------------------------------------- | |
'ForDebug---------------------------------------------------------------------- | |
'時間計測 | |
timeEnd = Time$ | |
Debug.Print "経過時間:" & DateDiff("s", timeStart, timeEnd) | |
'ForDebug---------------------------------------------------------------------- | |
'時間計測をするための宣言 | |
Declare Function GetTickCount Lib "kernel32" () As Long | |
Declare Function timeGetTime Lib "winmm.dll" () As Long | |
'ForDebug---------------------------------------------------------------------- | |
'時間計測 | |
Dim timeStart As Long | |
Dim timeEnd As Long | |
timeStart = GetTickCount() | |
'ForDebug---------------------------------------------------------------------- | |
'ForDebug---------------------------------------------------------------------- | |
'時間計測 | |
timeEnd = GetTickCount() | |
Debug.Print "経過時間:" & CSng((timeEnd - timeStart) / 1000) | |
'ForDebug---------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment