|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
Delay?
Is there a delay method in java? Like I want to day the loop so it like does stuff every like second or something. Any help will be appreciated.
|
|
#2
|
||||
|
||||
|
The Thread object (java.lang.Thread) has a sleep method in it.
Code:
try {
thrdFoo.sleep(250); // sleep for 1/4 sec
} catch (InterruptedException e) {}
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Delay? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|