Public Function GetTickCount() As Long
Returns the number of milli seconds this computer is running as long. Cycles after 2147483648 milli seconds (about 24.8 days). Use GetTickCount64 for a safer version.
Dim lStartTick As Long = GetTickCount()
Call SomeLongDuringTask
SendDebug $"Running the task took {GetTickCount() - lStartTick} milli seconds."