def brute_frequency

      key = "brute_frequency:#{@original}"

      delta = self.class.cache[key]
      return delta if delta

      delta = 366 * DAY_S

      t0 = previous_time(Time.local(2000, 1, 1))

      loop do

        break if delta <= 1
        break if delta <= 60 && @seconds && @seconds.size == 1

        t1 = next_time(t0)
        d = t1 - t0
        delta = d if d < delta
        break if @months.nil? && t1.month == 2
        break if @months.nil? && @days.nil? && t1.day == 2
        break if @months.nil? && @days.nil? && @hours.nil? && t1.hour == 1
        break if @months.nil? && @days.nil? && @hours.nil? && @minutes.nil? && t1.min == 1
        break if t1.year >= 2001

        t0 = t1
      end

      self.class.cache[key] = delta
    end
def brute_frequency

      key = "brute_frequency:#{@original}"

      delta = self.class.cache[key]
      return delta if delta

      delta = 366 * DAY_S

      t0 = previous_time(Time.local(2000, 1, 1))

      loop do

        break if delta <= 1
        break if delta <= 60 && @seconds && @seconds.size == 1

        t1 = next_time(t0)
        d = t1 - t0
        delta = d if d < delta
        break if @months.nil? && t1.month == 2
        break if @months.nil? && @days.nil? && t1.day == 2
        break if @months.nil? && @days.nil? && @hours.nil? && t1.hour == 1
        break if @months.nil? && @days.nil? && @hours.nil? && @minutes.nil? && t1.min == 1
        break if t1.year >= 2001

        t0 = t1
      end

      self.class.cache[key] = delta
    end
Returns the shortest delta between two potential occurences of the
 schedule described by this cronline.

 .

 For a simple cronline like "*/5 * * * *", obviously the frequency is
 five minutes. Why does this method look at a whole year of #next_time ?

 Consider "* * * * sun#2,sun#3", the computed frequency is 1 week
 (the shortest delta is the one between the second sunday and the third
 sunday). This method takes no chance and runs next_time for the span
 of a whole year and keeps the shortest.

 Of course, this method can get VERY slow if you call on it a second-
 based cronline...