Public Function delay(t As Single)Dim T1 As SingleT1 = TimerDoDoEventsLoop While Timer - T1 < tEnd Function