i got this code in vb6
Private Sub pause(ByVal interval As Variant)
Dim Current As Variant
Current = Timer
Do While Timer - Current < Val(interval)
DoEvents
Loop
End Sub
How do I convert in vb.net? I have tried this way but it doesn't works.
Where is the mistake?
Private Sub pause(ByVal interval As Single)
Dim newDate As Date
newDate = DateAndTime.Now.AddSeconds(interval)
While DateAndTime.Now.Second <> newDate.Second
Application.DoEvents()
End While
End Sub
Thanks