Windows Phone Developers

Thursday, January 1, 2009

Sleep Function in NET

Sleep Function in VB.NET

In Visual Basic 6.0, we used the Sleep API function to allow the process to ‘sleep’ for specified time interval. VB.NET comes up with an sleep function on its own


The argument 500 in the above code specified the number of milliseconds for which the thread is blocked.

Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute.

Specify Infinite to block the thread indefinitely.

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon


  1. Thanks for this... I've been using my own routine for months now and only just noticed that it sucks up 100% of CPU... the method you gave here hardly uses up any at all! Kudos...