Mega Code Archive
Categories
/
Java
/
Threads
Pausing the Current Thread
public class Main { public static void main(String[] argv) throws Exception { long numMillisecondsToSleep = 5000; // 5 seconds Thread.sleep(numMillisecondsToSleep); } }