lib/polyphony/core/timer.rb
# Runs a timer iteration, invoking any timeouts that are due.
#
# @return [void]      
Runs a timer iteration, invoking any timeouts that are due.
Runs a timer iteration invoking any timeouts that are due .
def update
      return if @timeouts.empty?
      @timeouts.each do |fiber, record|
        next if record[:target_stamp] > now
        value = record[:exception] ? timeout_exception(record) : record[:value]
        fiber.schedule value
        next unless record[:recurring]
        while record[:target_stamp] <= now
          record[:target_stamp] += record[:interval]
        end
      end
    end
def update return if @timeouts . empty? @timeouts . each do | fiber , record | next if record [ :target_stamp ] > now value = record [ :exception ] ? timeout_exception ( record ) : record [ :value ] fiber . schedule value next unless record [ :recurring ] while record [ :target_stamp ] <= now record [ :target_stamp ] += record [ :interval ] end end end
Runs a timer iteration, invoking any timeouts that are due.
Runs a timer iteration invoking any timeouts that are due .
None
void