python的简单秒表
stopwatch.p的Python项目详细描述
stopwatch.py
===
一个简单的python秒表,小巧、高效且无依赖关系
安装
----
代码::sh
pip install stopwatch.py
代码::py
from stopwatch import stopwatch
stopwatch=stopwatch();stopwatch一直在运行
时间冻结
stopwatch.start();重新启动
stopwatch.reset();将其重置为0
stopwatch.restart();重新设置并重新启动
stopwatch.running;秒表是否正在运行
stopwatch.duration;获取持续时间
str(秒表)获取友好的持续时间字符串
---BR/>没有抱歉,这个模块依赖于'Posith.PrimeOffice()',它不存在于Python 2上,它应该与任何Python 3+版本兼容,如果其他python实现了``time.perf_counter()``
license
----
mit
credits
----
最初由'dirigeants<;https://github.com/dirigeants>;``在这个文件中编写<;https://github.com/dirigeants/klasa/blob/master/src/lib/util/stopwatch.js>;`我只是查看了它并用python重新编写了它,把它放在一个模块中感觉很有用。
===
一个简单的python秒表,小巧、高效且无依赖关系
安装
----
代码::sh
pip install stopwatch.py
代码::py
from stopwatch import stopwatch
stopwatch=stopwatch();stopwatch一直在运行
时间冻结
stopwatch.start();重新启动
stopwatch.reset();将其重置为0
stopwatch.restart();重新设置并重新启动
stopwatch.running;秒表是否正在运行
stopwatch.duration;获取持续时间
str(秒表)获取友好的持续时间字符串
license
----
mit
credits
----
最初由'dirigeants<;https://github.com/dirigeants>;``在这个文件中编写<;https://github.com/dirigeants/klasa/blob/master/src/lib/util/stopwatch.js>;`我只是查看了它并用python重新编写了它,把它放在一个模块中感觉很有用。