public void testMoveMarkBack() throws Exception { timer.markTime(); long mark = timer.getTimeOfLastActivity(); timer.moveMarkBackInTime(12345); assertEquals(12345, (mark - timer.getTimeOfLastActivity())); }
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 }