Class TestClock


  • public class TestClock
    extends Clock
    A Clock, which must be explicitely 'ticked'. This is of course mainly useful for testing
    Since:
    0.4
    Author:
    Michiel Meeuwissen
    • Constructor Detail

      • TestClock

        public TestClock()
    • Method Detail

      • tick

        public void tick​(TemporalAmount duration)
        Progresses the clock the given amount of time.
      • tick

        public void tick​(long millis)
        Progresses the clock with the number of given millis.
      • sleep

        public void sleep​(long millis)
        Progresses the clock with the number of given millis. (Drop in replacement for Thread.sleep(long))
      • tick

        public void tick()
        Progresses the clock with exactly one second