Class TimeLimit

    • Constructor Detail

      • TimeLimit

        public TimeLimit​(long maximumTime,
                         TimeUnit unit)
        Create a new TimeLimit.
        Parameters:
        maximumTime - the value of the time limit (must be > 0)
        unit - the unit of the time limit
    • Method Detail

      • getTimeout

        public long getTimeout()
        Returns:
        The time limit in milliseconds
      • compareTo

        public int compareTo​(Limit other)
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class Limit
      • doesExceed

        public boolean doesExceed​(long count)
        Specified by:
        doesExceed in class Limit