Skip to content

Commit f3b8229

Browse files
committed
Add timer to receiver
1 parent 2409f92 commit f3b8229

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

python/image-mediator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
import base64
55
from PIL import Image
66
from io import BytesIO
7+
import time
78

89

910
def main():
11+
print('Receiving')
12+
start = time.time()
1013
input_data = sys.stdin.buffer.read()
1114
# input_data = sys.stdin.read()
1215
bio = BytesIO()
1316
bio.write(base64.b64decode(input_data))
1417
pil_image = Image.open(bio)
1518
image_array = np.array(pil_image)
1619
sys.stdin.close()
20+
print('Received')
21+
print('Time: ' + str(round((time.time() - start) * 1000)) + ' ms')
1722
if input_data:
1823
image = cv2.cvtColor(image_array, cv2.COLOR_RGB2BGR)
1924
# image = image_array

0 commit comments

Comments
 (0)