Package com.yahoo.concurrent
Interface Timer
- All Known Implementing Classes:
SystemTimer
public interface Timer
This interface wraps access to some timer that can be used to measure elapsed time, in milliseconds. This
abstraction allows for unit testing the behavior of time-based constructs.
- Author:
- Simon Thoresen Hult
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the current value of some arbitrary timer, in milliseconds.
-
Method Details
-
milliTime
long milliTime()Returns the current value of some arbitrary timer, in milliseconds. This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time.- Returns:
- The current value of the timer, in milliseconds.
-