Timer { public String time() { return durationString(System.currentTimeMillis() - start); } Timer();  Timer(String obj, String objs); void reset(); String time(); String millis(); String frequency(long count);  }
@Test public void testSeconds() throws InterruptedException { Timer timer = new Timer(); Thread.sleep(1000); String s = timer.time(); assertTrue(s.matches(".*")); }
@Test public void testMilliseconds() throws InterruptedException { Timer timer = new Timer(); Thread.sleep(10); String s = timer.time(); assertTrue(s.matches(".*")); }