kbt.py 319 B

1234567891011121314151617
  1. import datetime
  2. starttime = datetime.datetime.now()
  3. # long running
  4. # do something other
  5. lls = []
  6. i = 0
  7. for i in range(300000):
  8. lls.append(i)
  9. # if len(lls) > 1000:
  10. # lls = []
  11. i = i + 1
  12. if i > 1000:
  13. lls = []
  14. i = 0
  15. endtime = datetime.datetime.now()
  16. print((endtime - starttime))