Package 

Interface ITime


  • 
    public interface ITime
    
                        

    Provides 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 Long getCurrentTimeMillis() Returns the current time in unix time milliseconds (the number of milliseconds between the current time and midnight, January 1, 1970 UTC).
      abstract Long getProcessUptimeMillis() Returns how long the app has been running.
      abstract Long getElapsedRealtimeMillis() Milliseconds since boot, including deep sleep.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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).

      • getElapsedRealtimeMillis

         abstract Long getElapsedRealtimeMillis()

        Milliseconds since boot, including deep sleep. Unaffected by device clock changes, so use it for deadlines within this process.