Staging
v0.5.1
https://github.com/python/cpython
Revision 91e742fb6bb59c5a787f4b8a2584fdab4d82dd73 authored by Tim Peters on 27 February 2006, 17:47:02 UTC, committed by Tim Peters on 27 February 2006, 17:47:02 UTC
Patch 1413181, by Gabriel Becedillas.

PyThreadState_Delete():  if the auto-GIL-state machinery knows about
the thread state, forget it (since the thread state is being deleted,
continuing to remember it can't help, but can hurt if another thread
happens to get created with the same thread id).
1 parent 05b9254
Raw File
Tip revision: 91e742fb6bb59c5a787f4b8a2584fdab4d82dd73 authored by Tim Peters on 27 February 2006, 17:47:02 UTC
Merge rev 42607 from the trunk.
Tip revision: 91e742f
test_timing.py
from test.test_support import verbose
import timing

r = range(100000)
if verbose:
    print 'starting...'
timing.start()
for i in r:
    pass
timing.finish()
if verbose:
    print 'finished'

secs = timing.seconds()
milli = timing.milli()
micro = timing.micro()

if verbose:
    print 'seconds:', secs
    print 'milli  :', milli
    print 'micro  :', micro
back to top