home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / test_timing.py < prev    next >
Text File  |  2003-12-30  |  359b  |  22 lines

  1. from test.test_support import verbose
  2. import timing
  3.  
  4. r = range(100000)
  5. if verbose:
  6.     print 'starting...'
  7. timing.start()
  8. for i in r:
  9.     pass
  10. timing.finish()
  11. if verbose:
  12.     print 'finished'
  13.  
  14. secs = timing.seconds()
  15. milli = timing.milli()
  16. micro = timing.micro()
  17.  
  18. if verbose:
  19.     print 'seconds:', secs
  20.     print 'milli  :', milli
  21.     print 'micro  :', micro
  22.