Beispiel #1
0
 @Test
 public void testGetSeconds() throws InterruptedException {
   final NanoTimer t = new NanoTimer();
   Thread.sleep(1000);
   assertEquals(1, t.getSeconds(), 0.01); // time = 1 second within .01 seconds tolerance
 }