README.md

December 5, 2022 ยท View on GitHub

Timer Class Module

Description

This class module contains everything needed for creating a timer. It is very simple (18 lines), but provides millisecond accuracy using the GetTickCount API.

More Info

To start the timer: MyTimer.StartTimer

To stop the timer: MyTimer.StopTimer

To read duration: MyTimer.ElapsedTime

Duration the timer has been running in milliseconds (divide by 1000 for seconds).

Due to the fact this is a class module the timer will continue to run even if a message box is displayed - the normal VB timer will pause when a messagebox is displayed. This can be an advantage or disadvantage, so take note.

Submitted On2005-03-31 08:15:02
ByJames Arnold
LevelBeginner
User Rating5.0 (10 globes from 2 users)
CompatibilityVB 5.0, VB 6.0
CategoryVB function enhancement
WorldVisual Basic
Archive FileTimer_Clas1870063312005.zip

API Declarations

Dim myTimer as timTimer
Set myTimer = New timTimer