def main(): sock = client() while True: start = time.time() run(sock) end = time.time() print end - start
def main(): global n Thread(target=monitor).start() sock = client() while True: run(sock) n += 1