| My Delay - Delay Program Execution x seconds |
|
|
|
| Sunday, 29 August 2010 14:45 |
|
Sorry, this isn't groundbreaking, but this is the first VB.NET code I'm adding here, hoping the GeSHi is working right.
Shared Sub myDelay(ByVal myDelayedSeconds As Integer) Try Dim myNow As DateTime = Now() Dim myAlarm As DateTime = myNow.AddSeconds(myDelayedSeconds) Do Until Now > myAlarm Application.DoEvents() Loop Catch ex As Exception ' Error Reporting End Try End Sub |