import time start_time = time.clock()# do sthend_time = time.clock()print 'time cost: %f' % (end_time - start_time)