-
public interface ClockInterface to allow injecting of time functionality into a class for easier unit testing.
Use SYSTEM instance to delegate functionality to System.currentTimeMillis() and default Date constructor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classClock.Companion
-
Method Summary
Modifier and Type Method Description abstract LongcurrentTimeMillis()Gets current time in milliseconds. LongcurrentTimeSeconds()Gets current time in seconds. IntegercurrentTimeSecondsInt()abstract DatenewDate()Creates instance of type Date. -
-
Method Detail
-
currentTimeMillis
abstract Long currentTimeMillis()
Gets current time in milliseconds.
-
currentTimeSeconds
Long currentTimeSeconds()
Gets current time in seconds.
-
currentTimeSecondsInt
Integer currentTimeSecondsInt()
-
-
-
-