~ubuntu-branches/ubuntu/vivid/python-gevent/vivid

« back to all changes in this revision

Viewing changes to greentest/bench_sleep0.py

  • Committer: Bazaar Package Importer
  • Author(s): Örjan Persson
  • Date: 2011-05-17 16:43:20 UTC
  • mto: (14.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20110517164320-jyr5vamkqi3jfeab
Tags: upstream-0.13.6
Import upstream version 0.13.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
N = 10000
5
5
 
 
6
 
6
7
start = time()
7
8
for _ in xrange(N):
8
9
    sleep(0)
9
10
delta = time() - start
10
 
print 'sleep(0): %.1f microseconds' % (delta*1000000.0/N)
11
 
 
 
11
print 'sleep(0): %.1f microseconds' % (delta * 1000000.0 / N)