Skip to content

Instantly share code, notes, and snippets.

@venthur
Created May 15, 2013 09:35
Show Gist options
  • Save venthur/5582778 to your computer and use it in GitHub Desktop.
Save venthur/5582778 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from multiprocessing import Process
import time
timer = time.clock
def proc():
time.sleep(1)
for i in range(10):
print('P2 {time}'.format(time=timer()))
time.sleep(1)
if __name__ == '__main__':
p = Process(target=proc)
p.start()
for i in range(10):
print('P1 {time}'.format(time=timer()))
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment