Example #1
0
  public void testMoveMarkBack() throws Exception {
    timer.markTime();
    long mark = timer.getTimeOfLastActivity();

    timer.moveMarkBackInTime(12345);

    assertEquals(12345, (mark - timer.getTimeOfLastActivity()));
  }
Example #2
0
 public void testStartTime() throws Exception {
   long now = System.nanoTime();
   long then = timer.getTimeOfLastActivity();
   assertEquals("" + (now - then), true, now - then < ONE_MILLION); // less than 1 milisecond
 }