lib/fast-tcpn/timed_hash_marking.rb
def time=(time)
      if time < @time
        raise InvalidTime.new("You are trying to put back clock from #{@time} back to #{time}")
      end
      @time = time
      @waiting.keys.sort.each do |timestamp|
        if timestamp > @time
          @next_time = timestamp
          break
        end
        @waiting[timestamp].each { |token| add_token token }
        @waiting.delete timestamp
      end
      @next_time = 0 if @waiting.empty?
      @time
    end
def time=(time)
      if time < @time
        raise InvalidTime.new("You are trying to put back clock from #{@time} back to #{time}")
      end
      @time = time
      @waiting.keys.sort.each do |timestamp|
        if timestamp > @time
          @next_time = timestamp
          break
        end
        @waiting[timestamp].each { |token| add_token token }
        @waiting.delete timestamp
      end
      @next_time = 0 if @waiting.empty?
      @time
    end
Set current time for the marking.
 This will cause moving tokens from waiting to active list.
 Putting clock back will cause error.