As a VB6 programmer, I am finding even more difficult to find pieces of VB6 code these days. As all VB6 programmers might know, VB6 and VB.NET has slight differences (VB.NET is claimed to be 100% Object Oriented)
So here is a snippet of code that calculates the time difference in milliseconds
Public Declare Function GetTickCount Lib “kernel32” () As Long ‘For timer
Function_name()
Dim dtStart As Long
Dim dtEnd As Long
Dim result As Long
Dim i As IntegerdtStart = GetTickCount
‘Do task
dtEnd = GetTickCount
result = dtEnd – dtStart
MsgBox “Duration is ” & result & ” milliseconds.”
End Function
Taken from here