Dim StartTime As Long = DateTime.Now
'lots of calculations or whatever
Dim EndTime As Long = DateTime.Now
Dim ElapsedTime As Long = EndTime - StartTime 'Int works for up to three weeks
Log("Those calculations took " & ElapsedTime & " milliseconds = " & _
NumberFormat2(ElapsedTime / 1000, 1, 3, 3, False) & " seconds")