Class VirtualTimeDateProvider

  • All Implemented Interfaces:
    com.android.utils.DateProvider

    public class VirtualTimeDateProvider
    extends java.lang.Object
    implements com.android.utils.DateProvider
    An implementation of DateProvider that uses the virtual notion of time of a VirtualTimeScheduler to provide a presentation of "now". To be used in tests where it is better not to have fluent notion of time.
    • Field Summary

      • Fields inherited from interface com.android.utils.DateProvider

        SYSTEM
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date now()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VirtualTimeDateProvider

        public VirtualTimeDateProvider​(VirtualTimeScheduler virtualTimeScheduler)
    • Method Detail

      • now

        public java.util.Date now()
        Specified by:
        now in interface com.android.utils.DateProvider