• Many times you need some method of timing within an application. You
may want to know how long a certain routine (needed for real-time simulations)
takes to execute or want to implement some sort of delay in your code. The DLL
function GetTickCount is very useful for such tasks.
• The DLL function GetTickCount is a measure of the number of milliseconds
that have elapsed since Windows was started on your machine. GetTickCount is 85
percent faster than the Visual Basic Timer or Now functions. The GetTickCount
function has no arguments. The returned value is a long integer. The usage syntax
Dim TickValue as Long
TickValue = GetTickCount()
Let’s look at a couple of applications of this function.
Quick Example 1: Using GetTickCount to Build a Stopwatch