/* Program to print the time it takes the user to input data. * Uses StopWatch class. * * Carsten Butz, September 2002. */ import tio.*; class StopUserInput{ public static void main(String[] args){ int input = 0; StopWatch sw = new StopWatch(); while(input != -1){ sw.reset(); System.out.println("Please enter a number and press return."); input = Console.in.readInt(); System.out.print("It took you " + sw.getTime()); System.out.println(" millisecond(s) to enter the data."); } } }