Advertisement
Java_Volume1 Debugging and Error Handling #90122

clsTimer

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

AI

Ringkasan 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.

Kode Sumber
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
Komentar Asli (3)
Dipulihkan dari Wayback Machine