Package com.compomics.util.waiting
Class Duration
java.lang.Object
com.compomics.util.waiting.Duration
Class used to measure duration of a process.
- Author:
- Marc Vaudel
-
Constructor Details
-
Duration
public Duration()Constructor for an empty instance. Start and end time can be set via the start() and end() methods. -
Duration
public Duration(long start, long end) Constructor.- Parameters:
start- the process start time in millisecondsend- the process end time in milliseconds
-
-
Method Details
-
start
public void start()Sets the start time to the system current time in milliseconds. -
end
public void end()Sets the end time to the system current time in milliseconds. -
getDuration
public long getDuration()Returns the duration in milliseconds.- Returns:
- the duration in milliseconds
-
toString
-