示例#1
0
    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)
 def start(self):
     if self.watch == ffi.NULL:
         self.watch = C.zmq_stopwatch_start()
     else:
         raise ZMQError('Stopwatch is already runing.')
示例#3
0
 def start(self):
     if self.watch == ffi.NULL:
         self.watch = C.zmq_stopwatch_start()
     else:
         raise ZMQError('Stopwatch is already runing.')