Exemplo n.º 1
0
 public static void main(String[] args) {
   LOGGER.info("in constructor");
   StopWatch stopWatch = new StopWatch();
   stopWatch.start();
   try {
     Thread.sleep(3000);
   } catch (InterruptedException e) {
     e
         .printStackTrace(); // To change body of catch statement use File | Settings | File
                             // Templates.
   }
   stopWatch.split();
   try {
     Thread.sleep(3000);
   } catch (InterruptedException e) {
     e
         .printStackTrace(); // To change body of catch statement use File | Settings | File
                             // Templates.
   }
   stopWatch.stop();
   // System.out.println("split time " + stopWatch.toSplitString());
   System.out.println("time elapsed is " + stopWatch.getTime());
 }