An interface abstracting the clock to use in unit testing classes that make use of clock time
| 20 | * An interface abstracting the clock to use in unit testing classes that make use of clock time |
| 21 | */ |
| 22 | public interface Time { |
| 23 | |
| 24 | /** |
| 25 | * The current time in milliseconds |
| 26 | */ |
| 27 | public long milliseconds(); |
| 28 | |
| 29 | /** |
| 30 | * The current time in nanoseconds |
| 31 | */ |
| 32 | public long nanoseconds(); |
| 33 | |
| 34 | /** |
| 35 | * Sleep for the given number of milliseconds |
| 36 | */ |
| 37 | public void sleep(long ms); |
| 38 | |
| 39 | } |
no outgoing calls
no test coverage detected