Skip to content

Instantly share code, notes, and snippets.

Last active Nov 23, 2018
What would you like to do?
"""Usage: start `nc -l 8080`, then run this script."""
from __future__ import print_function
import socket
import time
if __name__ == '__main__':
n1 = time.clock()
n2 = time.time()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('', 8080))
print('time.clock: %f' % (time.clock() - n1))
print('time.time: %f' % (time.time() - n2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment