What I want is to start counting time somewhere in my code and then get the passed time, to measure the time it took to execute few function. 我想要的是开始在个人代码中的某个地方开始计时,而后获取通过的时间,以衡量执行少许功能所花费的时间。 I think I'm using the timeit module wrong, but the docs are just confusing for me. 我认为我使用的timeit模块错误,可是文档对我来讲却很混乱。 spa
import timeit start = timeit.timeit() print("hello") end = timeit.timeit() print(end - start)