'BlockingConnection.add_timeout and remove_timeout'

def test(self):

    connection = self._connect()
    start_time = time.time()
    rx_callback = []
    timer_id = connection.add_timeout(0.005, (lambda : rx_callback.append(time.time())))
    while (not rx_callback):
        connection.process_data_events(time_limit=None)
    self.assertEqual(len(rx_callback), 1)
    elapsed = (time.time() - start_time)
    self.assertLess(elapsed, 0.25)
    connection.remove_timeout(timer_id)
    rx_callback = []
    timer_id = connection.add_timeout(0.001, (lambda : rx_callback.append(time.time())))
    connection.remove_timeout(timer_id)
    connection.process_data_events(time_limit=0.1)
    self.assertFalse(rx_callback)
    evt = blocking_connection._TimerEvt((lambda : None))
    repr(evt)
