Here you can find the source of pause(int i, String unit)
public static void pause(int i, String unit)
//package com.java2s; //License from project: Open Source License public class Main { public static void pause(int i, String unit) { try {/*from www.ja v a 2 s.co m*/ switch (unit) { case "ms": Thread.sleep(i); break; case "s": Thread.sleep(i * 1000); break; case "m": Thread.sleep(i * 60000); break; default: break; } } catch (InterruptedException e) { e.printStackTrace(); } } }