def stop(self): if self.watch == ffi.NULL: raise ZMQError('Must start the Stopwatch before calling stop.') else: time = C.zmq_stopwatch_stop(self.watch) self.watch = ffi.NULL return time
def stop(self): if self.watch == ffi.NULL: raise ZMQError('Must start the Stopwatch before calling stop.') else: time = C.zmq_stopwatch_stop(self.watch) self.watch = ffi.NULL return time
def test_zmq_stopwatch_functions(self): from zmq.cffi_core._cffi import C, ffi stopwatch = C.zmq_stopwatch_start() ret = C.zmq_stopwatch_stop(stopwatch) assert ffi.NULL != stopwatch assert 0 < int(ret)