commit 6cee87af1857a0a3b84a55d1b2c6d5182e6e22b5 parent 7e59e40883f085175627bf566f3cfd64714abe3b Author: Daniel Barlow <dan@telent.net> Date: Wed, 28 Jan 2026 17:10:13 +0000 print byte count while recording Diffstat:
| M | client/eculocate.py | | | 10 | +++++++--- |
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/client/eculocate.py b/client/eculocate.py @@ -103,11 +103,11 @@ class Client(): # discover zeroconf until we have the requested service name name = sys.argv[1] -fqname = f"{name}._keihin._udp.local." +timeout = int(sys.argv[2]) +fqname = f"{name}._keihin._udp.local." client = Client() -timeout = int(sys.argv[2]) exists = False while not exists: @@ -116,8 +116,12 @@ while not exists: client.choose_service_name(fqname) print("record") +start_time = time.time() client.start_recording(True) -time.sleep(timeout) +while time.time() < start_time + timeout: + time.sleep(1) + print(f"{client.bytes_recorded} bytes received") + client.start_recording(False) print("fin")