Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python2..../Demo/rpc
File: T.py
# Simple interface to report execution times of program fragments.
[0] Fix | Delete
# Call TSTART() to reset the timer, TSTOP(...) to report times.
[1] Fix | Delete
[2] Fix | Delete
import sys, os, time
[3] Fix | Delete
[4] Fix | Delete
def TSTART():
[5] Fix | Delete
global t0, t1
[6] Fix | Delete
u, s, cu, cs = os.times()
[7] Fix | Delete
t0 = u+cu, s+cs, time.time()
[8] Fix | Delete
[9] Fix | Delete
def TSTOP(*label):
[10] Fix | Delete
global t0, t1
[11] Fix | Delete
u, s, cu, cs = os.times()
[12] Fix | Delete
t1 = u+cu, s+cs, time.time()
[13] Fix | Delete
tt = []
[14] Fix | Delete
for i in range(3):
[15] Fix | Delete
tt.append(t1[i] - t0[i])
[16] Fix | Delete
[u, s, r] = tt
[17] Fix | Delete
msg = ''
[18] Fix | Delete
for x in label: msg = msg + (x + ' ')
[19] Fix | Delete
msg = msg + '%r user, %r sys, %r real\n' % (u, s, r)
[20] Fix | Delete
sys.stderr.write(msg)
[21] Fix | Delete
[22] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function