This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 13th, 2012  |  syntax: Python  |  size: 0.38 KB  |  views: 207  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from array import array
  2. import time
  3.  
  4. class Foo(object): pass
  5.  
  6. def createArray():
  7.     return array('f', range(1000))
  8.  
  9. last = time.time()
  10. while 1:
  11.     now = time.time()
  12.     delta = now - last
  13.     last = now
  14.     if delta > 16.0/1000.0:
  15.         print 'here'
  16.     time.sleep(10.0/1000.0)
  17.     for _ in range(100):
  18.         b = Foo()
  19.     a = [1,2,3]*100
  20.     c = createArray()
clone this paste RAW Paste Data