Class StopWatch
java.lang.Object
org.jpos.util.StopWatch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()Sleeps until the configured deadline, returning immediately when already past it.static <T> TRunsfand pads its execution to at leastperiod.static <T> TRunsfand pads its execution to at leastperiodmilliseconds.booleanIndicates whether the deadline has been reached.
-
Constructor Details
-
StopWatch
-
StopWatch
Convenience constructor that takes the minimum duration in milliseconds.- Parameters:
periodInMillis- minimum duration in milliseconds
-
-
Method Details
-
finish
Sleeps until the configured deadline, returning immediately when already past it. -
isFinished
Indicates whether the deadline has been reached.- Returns:
trueif the configured period has elapsed
-
get
-
get
-