Class ClockTimeService

  • All Implemented Interfaces:
    TimeService

    @Deprecated
    public class ClockTimeService
    extends Object
    implements TimeService
    Deprecated.
    A Clock-based TimeService adapter to allow using Clock for TimeService-based dependencies.
    • Constructor Detail

      • ClockTimeService

        public ClockTimeService​(Clock clock)
        Deprecated.
        Constructs a Clock-based TimeService.
        Parameters:
        clock - the Clock instance
    • Method Detail

      • now

        public long now()
        Deprecated.
        Description copied from interface: TimeService
        Returns a value that represents "now" since the epoch.
        Specified by:
        now in interface TimeService
        Returns:
        a value that represents "now" since the epoch.