SHARE
TWEET

Untitled

a guest Sep 13th, 2012 216 Never
  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()
RAW Paste Data
Top