Skip to content
Snippets Groups Projects
Routines.java 345 B
Newer Older
Jan Kožusznik's avatar
Jan Kožusznik committed
package lab;

Jan Kožusznik's avatar
Jan Kožusznik committed
public final class Routines {
Jan Kožusznik's avatar
Jan Kožusznik committed

Jan Kožusznik's avatar
Jan Kožusznik committed
	private Routines() {	}
Jan Kožusznik's avatar
Jan Kožusznik committed
	
	public static void sleep(int timeInMilisenonds) {
		try {
			Thread.sleep(timeInMilisenonds);
		} catch (InterruptedException e) {
			Thread.currentThread().interrupt();
		}
	}
	
	public static boolean isEndOfThreadRequestedByJavaVM() {
		return Thread.interrupted();
	}
}