Package com.compomics.util.waiting
Class Duration
java.lang.Object
com.compomics.util.waiting.Duration
public class Duration extends Object
Class used to measure duration of a process.
- Author:
- Marc Vaudel
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
end()
Sets the end time to the system current time in milliseconds.long
getDuration()
Returns the duration in milliseconds.void
start()
Sets the start time to the system current time in milliseconds.String
toString()
-
Constructor Details
-
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
-