def run
      @started_at = Time.now
      max_cycles = 1

      while true do
        if @cycle < max_cycles
          step
        else
          diff = Time.now - @started_at
          max_cycles = (diff * @clock_cycle)
        end
      end
    end
def run
      @started_at = Time.now
      max_cycles = 1

      while true do
        if @cycle < max_cycles
          step
        else
          diff = Time.now - @started_at
          max_cycles = (diff * @clock_cycle)
        end
      end
    end
Run in endless loop