Package org.dashbuilder.dataset.engine
Interface Chronometer
-
public interface ChronometerThe interfaceChronometerpermits to measure the time elapsed between two time snapshots.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longelapsedTime()Return the elapsed time measured in nanoseconds since the very start.StringformatElapsedTime(long millis)Return the time specified in human readable format.longstart()Start the timer.longstop()Stop the timer.
-
-
-
Method Detail
-
start
long start()
Start the timer.
-
stop
long stop()
Stop the timer.
-
elapsedTime
long elapsedTime()
Return the elapsed time measured in nanoseconds since the very start.- Returns:
- long, the time.
-
formatElapsedTime
String formatElapsedTime(long millis)
Return the time specified in human readable format.- Parameters:
millis- The time to format in milliseconds.- Returns:
- Examples: 2d 3h 44m 2s or 20 weeks 3h 3s
-
-