File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
delay
Lucy Sommerman
Ranch Hand
Joined: Nov 25, 2004
Posts: 61
posted
Sep 16, 2005 04:03:00
0
What's the best way to add 10 second delay withing main () if not using threading?
thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35247
7
posted
Sep 16, 2005 04:07:00
0
Thread.currentThread().sleep(10000);
will do that even in a single-threaded application.
Android apps
–
ImageJ plugins
–
Java web charts
Sravan Kumar
Ranch Hand
Joined: Sep 11, 2005
Posts: 121
posted
Sep 16, 2005 04:25:00
0
Thread.sleep(10000) will do. sleep() method is static in Thread class and it causes the current thread to sleep for the specified number of milli-seconds.
keep smilin :: sravan<br /><a href="http://sravanpens.blogspot.com" target="_blank" rel="nofollow">I scribble here</a>
I agree. Here's the link:
http://aspose.com/file-tools
subject: delay
Similar Threads
Advice sought on Automation approach...
Note
JFileChooser Performance
Log files: Websphere
Web services book for beginners
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter