@Test public void testStopped() { final long start = System.currentTimeMillis(); Speedometer m = new Speedometer(start, true); assertEquals("0 B of 1.0 MB", m.getProgress(true, 1000000L, 0L)); assertEquals("500.0 KB of 1.0 MB", m.getProgress(false, 1000000L, 1000000L / 2)); }
public String getProgress(final boolean running, final long size, final long transferred) { return this.getProgress(System.currentTimeMillis(), running, size, transferred); }
Speedometer { public String getProgress(final boolean running, final long size, final long transferred) { return this.getProgress(System.currentTimeMillis(), running, size, transferred); } }
Speedometer { public String getProgress(final boolean running, final long size, final long transferred) { return this.getProgress(System.currentTimeMillis(), running, size, transferred); } Speedometer();  Speedometer(final long timestamp);  Speedometer(final long timestamp, final boolean decimal); }
Speedometer { public String getProgress(final boolean running, final long size, final long transferred) { return this.getProgress(System.currentTimeMillis(), running, size, transferred); } Speedometer();  Speedometer(final long timestamp);  Speedometer(final long timestamp, final boolean decimal); String getProgress(final boolean running, final long size, final long transferred); String getProgress(final long time, final boolean running, final long size, final long transferred); String getProgress(final boolean running, final long size, final long transferred, boolean plain, final Double speed); void reset(final Long timestamp, final Long transferred); }
Speedometer { public String getProgress(final boolean running, final long size, final long transferred) { return this.getProgress(System.currentTimeMillis(), running, size, transferred); } Speedometer();  Speedometer(final long timestamp);  Speedometer(final long timestamp, final boolean decimal); String getProgress(final boolean running, final long size, final long transferred); String getProgress(final long time, final boolean running, final long size, final long transferred); String getProgress(final boolean running, final long size, final long transferred, boolean plain, final Double speed); void reset(final Long timestamp, final Long transferred);  }