fork(4) download
  1. from threading import*
  2. from time import*
  3. m=time
  4. s=m()
  5. t=[]
  6. r=[]
  7. def f(t):n=m();sleep(9);t+=[m()-n]
  8. exec"r+=[Thread(None,f,0,[t])];r[-1].start();"*8
  9. for d in r:d.join()
  10. print m()-s,sum(t)
Success #stdin #stdout 0.01s 57248KB
stdin
Standard input is empty
stdout
9.04642319679 72.3581998348