public class Main {
    static public void main(String[] args) throws Exception {
        int millis = 1000;

        if (args.length > 1) {
            millis = Integer.parseInt(args[1]);
        }

        System.out.println("Sleeping " + millis + " msec...");

        long start = System.currentTimeMillis();
        Thread.sleep(millis);
        long elapsed = System.currentTimeMillis() - start;
        long offBy = Math.abs(elapsed - millis);

        System.out.println("Done sleeping");

        if (offBy > 250) {
            System.out.println("Actually slept about " + elapsed + " msec...");
        }
    }
}
