Renamed RemainingTimeCalculator to ProgressTracker
This commit is contained in:
parent
cff2d808b0
commit
1edf648d5e
@ -29,7 +29,7 @@ import org.nanoboot.powerframework.utils.functions.ThreeArgFunction;
|
|||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
||||||
* @since 0.0.0
|
* @since 0.0.0
|
||||||
*/
|
*/
|
||||||
public class RemainingTimeCalculator {
|
public class ProgressTracker {
|
||||||
|
|
||||||
private long startNanoTime = 0;
|
private long startNanoTime = 0;
|
||||||
private long total;
|
private long total;
|
||||||
@ -37,7 +37,7 @@ public class RemainingTimeCalculator {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
//Test
|
//Test
|
||||||
RemainingTimeCalculator rtc = new RemainingTimeCalculator(1000);
|
ProgressTracker rtc = new ProgressTracker(1000);
|
||||||
for(int i = 0;i< 1000;i++) {
|
for(int i = 0;i< 1000;i++) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep((long) (Math.random() * 100));
|
Thread.sleep((long) (Math.random() * 100));
|
||||||
@ -48,7 +48,7 @@ public class RemainingTimeCalculator {
|
|||||||
System.out.println(rtc.currentStatus());
|
System.out.println(rtc.currentStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RemainingTimeCalculator(final int total) {
|
public ProgressTracker(final int total) {
|
||||||
this.total = total;
|
this.total = total;
|
||||||
this.start();
|
this.start();
|
||||||
}
|
}
|
Reference in New Issue
Block a user