java wait(timeout) code example
Example: java wait(timeout)
import java.util.concurrent.TimeUnit;
...
try {
TimeUnit.SECONDS.sleep(1);
} catch (Exception e) {}
// .MILLISECONDS.sleep, .MINUTES.sleep, etc. are also available
import java.util.concurrent.TimeUnit;
...
try {
TimeUnit.SECONDS.sleep(1);
} catch (Exception e) {}
// .MILLISECONDS.sleep, .MINUTES.sleep, etc. are also available