diff options
author | Guido van Rossum <guido@python.org> | 1993-12-28 21:36:18 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-12-28 21:36:18 (GMT) |
commit | 0efafb39da32880543cd890590a4185b05040479 (patch) | |
tree | 4befd049789c315abf3723c085f66b642947ecbf /Demo | |
parent | 605909dc9d291275b6706acb196d86aa3c6c331f (diff) | |
download | cpython-0efafb39da32880543cd890590a4185b05040479.zip cpython-0efafb39da32880543cd890590a4185b05040479.tar.gz cpython-0efafb39da32880543cd890590a4185b05040479.tar.bz2 |
Rot out all uses of time.milli*().
Slightly improve debug output.
Diffstat (limited to 'Demo')
-rwxr-xr-x | Demo/sgi/video/Vrec.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Demo/sgi/video/Vrec.py b/Demo/sgi/video/Vrec.py index b3660e2..9d90a80 100755 --- a/Demo/sgi/video/Vrec.py +++ b/Demo/sgi/video/Vrec.py @@ -293,7 +293,7 @@ def record(v, info, filename, audiofilename, mono, grey, greybits, \ initaudio(audiofilename, audiostop, audiodone) gl.wintitle('(rec) ' + filename) lastid = 0 - t0 = time.millitimer() + t0 = time.time() count = 0 ids = [] v.InitContinuousCapture(info) @@ -301,7 +301,7 @@ def record(v, info, filename, audiofilename, mono, grey, greybits, \ try: cd, id = v.GetCaptureData() except sv.error: - #time.millisleep(10) # XXX is this necessary? + #time.sleep(0.010) # XXX is this necessary? sgi.nap(1) # XXX Try by Jack continue ids.append(id) @@ -322,15 +322,16 @@ def record(v, info, filename, audiofilename, mono, grey, greybits, \ cd.UnlockCaptureData() if filename: queue.put((data, int(id*tpf))) - t1 = time.millitimer() + t1 = time.time() gl.wintitle('(busy) ' + filename) - print lastid, 'fields in', t1-t0, 'msec', - print '--', 0.1 * int(lastid * 10000.0 / (t1-t0)), 'fields/sec' + print lastid, 'fields in', round(t1-t0, 3), 'sec', + print '--', round(lastid/(t1-t0), 1), 'fields/sec' print 'Captured',count*2, 'fields,', - print 0.1*int(count*20000.0/(t1-t0)), 'f/s', + print round(count*2/(t1-t0), 1), 'f/s', if lastid: - print count*200.0/lastid, '%,', - print count*rate*200.0/lastid, '% of wanted rate', + print '(', + print round(count*200.0/lastid), '%, or', + print round(count*rate*200.0/lastid), '% of wanted rate )', print if ids: print 'Ids:', |