By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Delaying application

P: n/a
I am running a loop which I need to pause for 3 seconds, at the end of each
cycle.

I found somewhere to use threads.delay(), but I am not using any threads and
when I typed it in, it wasn't even recognized as a command.

So what I am doing now is this:

for a = 0 to 15000
dim d as integer = a*a
next

This will delay the run of the next cycle for like 2-3 secs, but it's taking
all my cpu power and slows down the machine like crazy.

I need some workaround which wouldn't slow down my machine and would work as
a delay method for vb.net.

Thanks a lot for all your answers.

Sincerely,
K.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Krakatioison" <kl****@sssbbbccc.com> wrote in
news:41**********@127.0.0.1:
I found somewhere to use threads.delay(), but I am not using any
threads and when I typed it in, it wasn't even recognized as a
command.


System.Threading.Thread.Sleep

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #2

P: n/a
System.Threading.Thread.Sleep(milliseconds)

Nov 20 '05 #3

P: n/a
Ah,
thanks so very much.
worked like a charm.
k.

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
System.Threading.Thread.Sleep(milliseconds)


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.