mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-10 06:54:45 +00:00
removed time-test
This commit is contained in:
parent
922095ebe0
commit
c09f4d0897
@ -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()
|
|
Loading…
Reference in New Issue
Block a user