// purpose: provide some delaying tactics import java.util.*; public class Pause { // method untilReady(): wait for user public static void untilReady() { Scanner stdin = new Scanner( System.in ); System.out.print( "\nHit enter when ready: " ); String reply = stdin.nextLine(); System.out.println(); } // method moment(): pauses for a two-fifths of a second public static void moment( ) { try { Thread.sleep( 400 ); } catch ( InterruptedException e ) { } } // method seconds(): pauses for s seconds` public static void seconds( int s ) { try { Thread.sleep( s* 1000 ); } catch ( InterruptedException e ) { } } // method milliseconds(): pauses for s milliseconds` public static void milliseconds( int s ) { try { Thread.sleep( s ); } catch ( InterruptedException e ) { } } // method second(): pauses for a second public static void second( ) { Pause.seconds( 1 ); } }