PreparedKamonTimer implements PreparedTimer { @Override public boolean reset() { try { getSnapshot(true); LOGGER.trace("Reset timer with name <{}>", name); } catch (final IllegalStateException e) { LOGGER.warn("Could not reset Kamon timer.", e); return false; } return true; } private  PreparedKamonTimer(final String name); @Override PreparedTimer tags(final Map<String, String> tags); @Nullable @Override String getTag(final String key); @Override Map<String, String> getTags(); @Override PreparedTimer tag(final String key, final String value); StartedTimer start(); @Override PreparedTimer record(final long time, final TimeUnit timeUnit); @Override Long getTotalTime(); @Override Long getNumberOfRecords(); @Override String getName(); @Override boolean reset(); @Override String toString();  }
@Test public void reset() { sut.record(1, TimeUnit.SECONDS); assertThat(sut.getTotalTime()).isCloseTo(TimeUnit.SECONDS.toNanos(1), Percentage.withPercentage(1)); sut.reset(); assertThat(sut.getTotalTime()).isEqualTo(0); }