@Test
  public void testInitialTimes() {
    TestTimeService ts = new TestTimeService();
    final long nanoTime = ts.getTime();
    final NanoTimer timer = new NanoTimer(ts);

    assertEquals(timer.getConstructionTime(), timer.getLastResetTime());
    assertTrue(timer.getTimeSinceConstruction() <= timer.getTimeSinceReset());
    assertTrue(timer.getLastResetTime() >= nanoTime);
    assertTrue(timer.getConstructionTime() >= nanoTime);
    assertTrue(ts.getTime() >= nanoTime);

    final long nanosOne = ts.getTime();

    ts.incTime();

    assertEquals(1, timer.getTimeSinceConstruction());
  }
Unit tests for NanoTimer.

@since GemFire 7.0
geode-core/src/test/java/org/apache/geode/internal/NanoTimerJUnitTest.java