# File lib/sensors/sensor.rb, line 72
  def wait_for_event(expected = true, operator = nil)
        if operator
                comp = operator
        elsif expected.respond_to? '>='.intern
                comp = ">="
        else
                comp = "=="
        end
        
        while true
                value = yield
                return value if eval("value #{comp} expected")
                sleep(POLL_INTERVAL)
        end
  end