    # File lib/rbot/timer.rb, line 235
      def run_actions(now = Time.now)
        nxt = nil
        @actions.keys.each do |k|
          return -1 if @stopping
          a = @actions[k]
          next if (!a) or a.blocked?

          if a.next <= now
            begin
              @current = k
              v = a.run(now)
            ensure
              @current = nil
            end

            unless v
              @actions.delete k
              next
            end
          else
            v = a.next
          end

          nxt = v if v and ((!nxt) or (v < nxt))
        end

        if nxt
          delta = nxt - now
          delta = 0 if delta < 0
          return delta
        else
          return nil
        end
      end