public static void main(String[] args){
  Timer timer=new Timer("testTimer");
  Timer overallTimer=new Timer("overall");
  timer.showTimes(0L);
  overallTimer.start();
  for (int i=0; i < 5; i++) {
    timer.start();
    try {
      Thread.sleep(i * 1000L);
    }
 catch (    InterruptedException e) {
    }
    timer.stop(true);
  }
  overallTimer.stop();
  timer.showTimes(overallTimer.getCurrentTime());
  overallTimer.showTimes();
}

public static void main ( String [ ] args ) { Timer timer = new Timer ( "testTimer" ) ; Timer overallTimer = new Timer ( "overall" ) ; timer . showTimes ( 0L ) ; overallTimer . start ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { timer . start ( ) ; try { Thread . sleep ( i * 1000L ) ; } catch ( InterruptedException e ) { } timer . stop ( true ) ; } overallTimer . stop ( ) ; timer . showTimes ( overallTimer . getCurrentTime ( ) ) ; overallTimer . showTimes ( ) ; }
the main program for performing simple tests . creates a timer uses it and shows its output .
