fixup timing script

This commit is contained in:
Adeeb Shihadeh
2021-07-09 21:12:18 -07:00
parent d11b0c06bf
commit 69160375c6
+2 -2
View File
@@ -17,8 +17,8 @@ if __name__ == "__main__":
msgs = messaging.drain_sock(sock)
for m in msgs:
ts[s].append(m.logMonoTime / 1e6)
time.sleep(1)
if len(ts[s]) == ts[s].maxlen:
d = np.diff(ts[s])
print(f"{s:17} {np.max(d):.2f} {np.max(d):.2f} {np.max(d):.2f} {np.std(d):.2f}")
print(f"{s:17} {np.mean(d):.2f} {np.std(d):.2f} {np.max(d):.2f} {np.min(d):.2f}")
time.sleep(1)