@Test public void testProgressRemaining() { final long start = System.currentTimeMillis(); Speedometer m = new Speedometer(start, true); assertEquals("1 B of 5 B (20%, 1 B/sec, 4 seconds remaining)", m.getProgress(start + 1000L, true, 5L, 1L)); assertEquals("4 B of 5 B (80%, 2 B/sec, 1 seconds remaining)", m.getProgress(start + 3000L, true, 5L, 4L)); assertEquals("4 B of 5 B (80%, 0 B/sec)", m.getProgress(start + 4000L, true, 5L, 4L)); }
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);  }