oaTimer
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaTimer 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaTimer 当前在 oapy 中可用的 Python 接口。
详细说明
The oaTimer class is a utility class used to time how long a section of code takes to execute。 Elapsed time is recorded since the construction of oaTimer or the last reset。 The units for the elapsed time is seconds。
构造函数
_base.oaTimer()
obj = _base.oaTimer()
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.reset() |
| ✅ | obj.getElapsed() |
| ✅ | obj.getElapsed() |
方法说明
obj.reset()
绑定状态: 已绑定
Python 调用: obj.reset()
This function resets the time counter with a new snapshot of the clock。
Python 示例
from oapy._oa import _base
# assume obj is a oaTimer
obj.reset()
obj.getElapsed()
绑定状态: 已绑定
Python 调用: obj.getElapsed()
This function returns the elapsed time from when the oaTimer object was constructed or from the last call to reset() 。
Python 示例
from oapy._oa import _base
# assume obj is a oaTimer
obj.getElapsed()
obj.getElapsed()
绑定状态: 已绑定
Python 调用: obj.getElapsed()
This function is deprecated。 Use the const version of oaTimer:: getElapsed instead。 This function returns the elapsed time from when the oaTimer object was constructed or from the last call to reset() 。
Python 示例
from oapy._oa import _base
# assume obj is a oaTimer
obj.getElapsed()