diff options
Diffstat (limited to 'Demo/rpc/T.py')
-rw-r--r-- | Demo/rpc/T.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Demo/rpc/T.py b/Demo/rpc/T.py index 2adf486..3325507 100644 --- a/Demo/rpc/T.py +++ b/Demo/rpc/T.py @@ -4,19 +4,19 @@ import sys, os, time def TSTART(): - global t0, t1 - u, s, cu, cs = os.times() - t0 = u+cu, s+cs, time.time() + global t0, t1 + u, s, cu, cs = os.times() + t0 = u+cu, s+cs, time.time() def TSTOP(*label): - global t0, t1 - u, s, cu, cs = os.times() - t1 = u+cu, s+cs, time.time() - tt = [] - for i in range(3): - tt.append(t1[i] - t0[i]) - [u, s, r] = tt - msg = '' - for x in label: msg = msg + (x + ' ') - msg = msg + '%r user, %r sys, %r real\n' % (u, s, r) - sys.stderr.write(msg) + global t0, t1 + u, s, cu, cs = os.times() + t1 = u+cu, s+cs, time.time() + tt = [] + for i in range(3): + tt.append(t1[i] - t0[i]) + [u, s, r] = tt + msg = '' + for x in label: msg = msg + (x + ' ') + msg = msg + '%r user, %r sys, %r real\n' % (u, s, r) + sys.stderr.write(msg) |