From d4233f44df42f4850288be0cf0bfda08dba6cce8 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 11 Feb 2015 01:45:54 -0800 Subject: [PATCH] bin/receive_text: print elapsed time --- bin/receive_text.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/receive_text.py b/bin/receive_text.py index c0e75c7..85806c4 100644 --- a/bin/receive_text.py +++ b/bin/receive_text.py @@ -1,13 +1,15 @@ from __future__ import print_function -import sys, json +import time, sys, json from wormhole.transcribe import Receiver APPID = "lothar.com/wormhole/text-xfer" # we're receiving +start = time.time() code = sys.argv[1] blob = b"{}" r = Receiver(APPID, blob, code) them_bytes = r.get_data() them_d = json.loads(them_bytes.decode("utf-8")) print(them_d["message"]) +print("elapsed time: %.2f" % (time.time() - start))