org.terrier.utility
Class TerrierTimer

java.lang.Object
  extended by org.terrier.utility.TerrierTimer

public class TerrierTimer
extends java.lang.Object

This class implements a timer.


Field Summary
protected  double percentage
           
protected  double total
          The total number of items to process in a task.
 
Constructor Summary
TerrierTimer()
          Default constructor.
 
Method Summary
 int getMinutes()
          Get the processing time in minutes.
 java.lang.String getPercentage()
          get percentage
 int getSeconds()
          Get the processing time in seconds.
static java.lang.String longToText(long timems)
           
 void restart()
          Reset the timer.
 void setBreakPoint()
          Compute the processing time.
 void setRemainingTime(double finished)
          Estimate the remaining time.
 void setTotalNumber(double _total)
          Set the overall quantitative workload of the task.
 void start()
          Start the timer.
 java.lang.String toStringMinutesSeconds()
          Get a string summarising the processing/remaining time in minutes and seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

total

protected double total
The total number of items to process in a task.


percentage

protected double percentage
Constructor Detail

TerrierTimer

public TerrierTimer()
Default constructor.

Method Detail

start

public void start()
Start the timer.


restart

public void restart()
Reset the timer.


setBreakPoint

public void setBreakPoint()
Compute the processing time.


getMinutes

public int getMinutes()
Get the processing time in minutes.


setTotalNumber

public void setTotalNumber(double _total)
Set the overall quantitative workload of the task.


setRemainingTime

public void setRemainingTime(double finished)
Estimate the remaining time.

Parameters:
finished - The quantitative finished workload.

getSeconds

public int getSeconds()
Get the processing time in seconds.


toStringMinutesSeconds

public java.lang.String toStringMinutesSeconds()
Get a string summarising the processing/remaining time in minutes and seconds.


getPercentage

public java.lang.String getPercentage()
get percentage

Returns:
percentage

longToText

public static java.lang.String longToText(long timems)


Terrier 3.5. Copyright © 2004-2011 University of Glasgow