及时::python中的简易秒表界面
timel的Python项目详细描述
python及时
====
python的秒表接口。当前支持两种模式:计时执行(:class:`stopwatch`),暂停代码块的完成,直到指定的时间结束:类:`blocker`.
stopwatch用法
----
:
s.duration()如果s>;3:比较器隐式计算duration
print“耗时超过3秒”
blocker usage
----
:
time.sleep(1.5)立即执行
我们在这里等待,直到3秒过去
打印“3秒过去!”
====
python的秒表接口。当前支持两种模式:计时执行(:class:`stopwatch`),暂停代码块的完成,直到指定的时间结束:类:`blocker`.
stopwatch用法
----
:
s.duration()如果s>;3:比较器隐式计算duration
print“耗时超过3秒”
blocker usage
----
:
time.sleep(1.5)立即执行
我们在这里等待,直到3秒过去
打印“3秒过去!”