def timestats(t0): c0, w0 = t0 dc, dw = clock() - c0, wall_time() - w0 if dc > 0.01 and dw > 0.01: timestr = '%.2f wall, %.2f CPU' % (dw, dc) else: timestr = '%.2e wall, %.2e CPU' % (dw, dc) return timestr
def get_times(): return (clock(), wall_time())