Time delay without Thread

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all.
I have been programming a simple console application, and want to delay
several seconds in the application for testing purpose.
I've been searching google and this newsgroup, and I found out I could do so
with Thread.Sleep method.
I would like to, however, avoid creating threads if possible (since this is
a simple application). Is there anyway to do it?

Thank you.
 
anonymous said:
Hi all.
I have been programming a simple console application, and want to delay
several seconds in the application for testing purpose.
I've been searching google and this newsgroup, and I found out I could do
so
with Thread.Sleep method.
I would like to, however, avoid creating threads if possible (since this
is
a simple application). Is there anyway to do it?

Thank you.

System.Threading.Thread.Sleep is a static method, You don't have to create a
thread in order to call it.

Willy.
 
"Willy Denoyette said:
System.Threading.Thread.Sleep is a static method, You don't have to create a
thread in order to call it.

And, further to this, calling it doesn't create a thread, it pauses the
current one.
 
Back
Top