Class Timer


  • public class Timer
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Timer​(long durationMillis)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long duration()  
      boolean isCounting()
      Informs whether the timer is still counting down.
      void start()
      Starts the timer count down.
      private void validateInput​(long durationMillis)  
      • Methods inherited from class java.lang.Object

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

      • durationMillis

        private final long durationMillis
      • startTime

        private long startTime
    • Constructor Detail

      • Timer

        public Timer​(long durationMillis)
    • Method Detail

      • isCounting

        public boolean isCounting()
        Informs whether the timer is still counting down.
      • start

        public void start()
        Starts the timer count down.
      • validateInput

        private void validateInput​(long durationMillis)
      • duration

        public long duration()