add recvplot2
This commit is contained in:
parent
cebd85e39c
commit
ecb4b4e819
@ -256,17 +256,33 @@ def device_recvplot():
|
|||||||
pull.connect(C.live_push_socket)
|
pull.connect(C.live_push_socket)
|
||||||
last_ts = 0
|
last_ts = 0
|
||||||
first = True
|
first = True
|
||||||
|
host_host_ts_last = time.time_ns()
|
||||||
while True:
|
while True:
|
||||||
b = pull.recv()
|
b = pull.recv()
|
||||||
|
host_host_ts = time.time_ns()
|
||||||
|
|
||||||
ts, sequence_id, encoder, buffer = b2t(b)
|
seq, encoder, host_ts, device_ts_low, device_ts_high, buffer = b2t(b)
|
||||||
|
ts = host_ts
|
||||||
if first:
|
if first:
|
||||||
last_ts = ts
|
last_ts = ts
|
||||||
first = False
|
first = False
|
||||||
continue
|
continue
|
||||||
print((ts - last_ts) / 10 ** 6, flush=True)
|
print((ts - last_ts) / 10 ** 6, flush=True)
|
||||||
last_ts = ts
|
last_ts = ts
|
||||||
|
host_host_ts_last = host_host_ts
|
||||||
|
|
||||||
|
@device.command('recvplot2')
|
||||||
|
def device_recvplot():
|
||||||
|
ctx = zmq.Context()
|
||||||
|
pull = ctx.socket(zmq.PULL)
|
||||||
|
pull.connect(C.live_push_socket)
|
||||||
|
host_host_ts_last = time.time_ns()
|
||||||
|
while True:
|
||||||
|
b = pull.recv()
|
||||||
|
host_host_ts = time.time_ns()
|
||||||
|
_ = b2t(b)
|
||||||
|
print((host_host_ts - host_host_ts_last) / 10 ** 6, flush=True)
|
||||||
|
host_host_ts_last = host_host_ts
|
||||||
|
|
||||||
@device.command('recvplotdiff')
|
@device.command('recvplotdiff')
|
||||||
def device_recvplotdiff():
|
def device_recvplotdiff():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user