Class SleepScheduler


  • public class SleepScheduler
    extends java.lang.Object
    Author:
    Maksim Tkachenko, Ween Jiann Lee
    • Constructor Summary

      Constructors 
      Constructor Description
      SleepScheduler​(long sleepTime)
      Constructs a sleep scheduler with fix sleep time.
      SleepScheduler​(long min, long max)
      Constructs a sleep scheduler with range of sleep time.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getSleepTime()
      Get the amount of time to wait specified in this class.
      • Methods inherited from class java.lang.Object

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

      • SleepScheduler

        public SleepScheduler​(long sleepTime)
        Constructs a sleep scheduler with fix sleep time.
        Parameters:
        sleepTime - Sleep time
      • SleepScheduler

        public SleepScheduler​(long min,
                              long max)
        Constructs a sleep scheduler with range of sleep time.
        Parameters:
        min - Minimum sleep time
        max - Maximum sleep time
    • Method Detail

      • getSleepTime

        public final long getSleepTime()
        Get the amount of time to wait specified in this class.
        Returns:
        interval required