dcsimg
Implement a delay
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, May 31, 2001 03:57 AM

Hi,

I need to know how to implement a delay of lets say about 20 seconds in java.


What's happening is i have a call in my program to a method which connects to a srver and gets information from it,and updates the databse it then calls another method to output it.


The problem is it's outputting the information before all the information has been updated in the databse can i write a simple delay method that'll delay the output call for say 5-10 seconds ?


Thanks,


Michael

Re: Implement a delay

Posted By:   Luigi_Viggiano  
Posted On:   Thursday, May 31, 2001 04:52 AM

Try this code:


try {
Thread.sleep(20000);
} catch (InterruptedException intEx) {
intEx.printStackTrace();
}
About | Sitemap | Contact