Private Declare Function GetTickCount Lib "kernel32" () As Long Private Sub Command1_Click() Dim i As Long, temp As Long, temp1 As Long temp = GetTickCount() For i = 0 To 9999 Form1.Print i; Next i Form1.Print temp1 = GetTickCount() Form1.Print temp1 - temp & "ms" End Sub
參考資料:
請問VB如何計算出某一段程式的執行時間
http://www.programmer-club.com.tw/ShowSameTitleN/vb/19215.html
沒有留言:
張貼留言