equal
deleted
inserted
replaced
639 * Implementation of a clock that adds an offset to an underlying clock. |
639 * Implementation of a clock that adds an offset to an underlying clock. |
640 */ |
640 */ |
641 static final class OffsetClock extends Clock implements Serializable { |
641 static final class OffsetClock extends Clock implements Serializable { |
642 @java.io.Serial |
642 @java.io.Serial |
643 private static final long serialVersionUID = 2007484719125426256L; |
643 private static final long serialVersionUID = 2007484719125426256L; |
|
644 @SuppressWarnings("serial") // Not statically typed as Serializable |
644 private final Clock baseClock; |
645 private final Clock baseClock; |
645 private final Duration offset; |
646 private final Duration offset; |
646 |
647 |
647 OffsetClock(Clock baseClock, Duration offset) { |
648 OffsetClock(Clock baseClock, Duration offset) { |
648 this.baseClock = baseClock; |
649 this.baseClock = baseClock; |
690 * Implementation of a clock that adds an offset to an underlying clock. |
691 * Implementation of a clock that adds an offset to an underlying clock. |
691 */ |
692 */ |
692 static final class TickClock extends Clock implements Serializable { |
693 static final class TickClock extends Clock implements Serializable { |
693 @java.io.Serial |
694 @java.io.Serial |
694 private static final long serialVersionUID = 6504659149906368850L; |
695 private static final long serialVersionUID = 6504659149906368850L; |
|
696 @SuppressWarnings("serial") // Not statically typed as Serializable |
695 private final Clock baseClock; |
697 private final Clock baseClock; |
696 private final long tickNanos; |
698 private final long tickNanos; |
697 |
699 |
698 TickClock(Clock baseClock, long tickNanos) { |
700 TickClock(Clock baseClock, long tickNanos) { |
699 this.baseClock = baseClock; |
701 this.baseClock = baseClock; |