Dim dt As Date = Date.now
Dim ms As Integer
Do While ms < 5
Dim t As TimeSpan = dt - Date.now
ms = t.Seconds
Loop