import time start = time.clock() end = time.clock() consume_time = end - start 转载于:https://www.cnblogs.com/ymjyqsx/p/9258762.html