Delay

  • Thread starter Thread starter David Webb
  • Start date Start date
D

David Webb

Hi,

I am writing an app and I need to simulate an 8 second delay. I've
looked at the timer but can't seem to get it to delay - I'm sure there
is something wrong with how I've done it. Does anyone have a delay sub
routine or something similar that they could post (VB.NET CF please!)
that will delay for a specified period of time?

Thanks in advance.

Regards,

David.
 
Or using System.Threading.Timer to invoke a callback routine (one shot
timer):

m_Timer = new Timer(new TimerCallback(myTimerCallback), this, Seconds *
1000, Timeout.Infinite); // One shot timer for Seconds sec

private void myTimerCallback(object state)
{
// do something here
}
 
Since it's likely based on an OS timer, it's guaranteed not to be less than
the time specified, though it could easily be (and often is) more.
 
Back
Top