-
public interface ITimeProvides an abstraction to retrieving the current time. This should be used rather than standard library services, to allow for more flexible testing scenarios.
-
-
Method Summary
Modifier and Type Method Description abstract LonggetCurrentTimeMillis()Returns the current time in unix time milliseconds (the number of milliseconds between the current time and midnight, January 1, 1970 UTC). abstract LonggetProcessUptimeMillis()Returns how long the app has been running. abstract LonggetElapsedRealtimeMillis()Milliseconds since boot, including deep sleep. -
-
Method Detail
-
getCurrentTimeMillis
abstract Long getCurrentTimeMillis()
Returns the current time in unix time milliseconds (the number of milliseconds between the current time and midnight, January 1, 1970 UTC).
-
getProcessUptimeMillis
abstract Long getProcessUptimeMillis()
Returns how long the app has been running.
-
getElapsedRealtimeMillis
abstract Long getElapsedRealtimeMillis()
Milliseconds since boot, including deep sleep. Unaffected by device clock changes, so use it for deadlines within this process.
-
-
-
-