Advertisement
7_2009-2012 Debugging and Error Handling #217366

clsTimer

This code keeps a count in milliseconds of how long it takes between calls of StartTimer and StopTimer or Elapsed.

AI

ملخص الذكاء الاصطناعي: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

كود المصدر
original-source
' in clsTimer...
Dim start, finish
Public Sub StopTimer()
  finish = GetTickCount()
End Sub
Public Sub StartTimer()
  start = GetTickCount()
  finish = 0
End Sub
Public Sub DebugTrace(v)
  Debug.Print v & " " & Elapsed()
End Sub
Public Property Get Elapsed()
  If finish = 0 Then
    Elapsed = GetTickCount() - start
  Else
    Elapsed = finish - start
  End If
End Property

Upload
التعليقات الأصلية (3)
مسترجع من Wayback Machine