@Test public void reset() { Counter tt = new Counter(); tt.add(123L); assertEquals("incorrect number of bytes", 123L, tt.total()); double d = tt.duration(); double t = tt.throughput(); assertEquals("incorrect duration", d, tt.duration(), 0.0001); assertEquals("incorrect throughput", t, tt.throughput(), 0.0001); assertEquals("incorrect number of bytes", 123L, tt.total()); tt.reset(); assertEquals("incorrect throughput", 0.0, tt.throughput(), 0.0001); assertEquals("incorrect number of bytes", 0, tt.total()); }
public synchronized void reset() { end = 0; total = 0; start = System.currentTimeMillis(); }
Counter { public synchronized void reset() { end = 0; total = 0; start = System.currentTimeMillis(); } }
Counter { public synchronized void reset() { end = 0; total = 0; start = System.currentTimeMillis(); } Counter();  Counter(long start, long total, long end); }
Counter { public synchronized void reset() { end = 0; total = 0; start = System.currentTimeMillis(); } Counter();  Counter(long start, long total, long end); synchronized void reset(); synchronized void freeze(); synchronized void add(long count); synchronized double throughput(); synchronized long total(); synchronized double duration(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
Counter { public synchronized void reset() { end = 0; total = 0; start = System.currentTimeMillis(); } Counter();  Counter(long start, long total, long end); synchronized void reset(); synchronized void freeze(); synchronized void add(long count); synchronized double throughput(); synchronized long total(); synchronized double duration(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }