From c09f4d0897d110bb7207d5aaeafeb6c3cd2d3f9f Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 11 Aug 2021 22:54:24 +0000 Subject: [PATCH] removed time-test --- src/cli/time-test.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/cli/time-test.py diff --git a/src/cli/time-test.py b/src/cli/time-test.py deleted file mode 100644 index 9d2c587..0000000 --- a/src/cli/time-test.py +++ /dev/null @@ -1,20 +0,0 @@ -import asyncio -import datetime -import random -import websockets - -async def time(websocket, path): - print(path) - i = 0 - while True: - #now = datetime.datetime.utcnow().isoformat() + "Z" - #await websocket.send(now) - #await asyncio.sleep(random.random() * 3) - i += 1 - await websocket.send(str(i)) - await asyncio.sleep(1) - -start_server = websockets.serve(time, "127.0.0.1", 5678) - -asyncio.get_event_loop().run_until_complete(start_server) -asyncio.get_event_loop().run_forever() \ No newline at end of file