BT.runtime
BT.runtime
功能
返回当前 BT 进程运行期信息。
语法
BT.runtime()
参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 无 | - | 否 | 无 | 不需要参数。 |
返回值
| 类型 | 说明 |
|---|---|
| Object | 返回 uptime、threads、start_time。 |
示例
runtime = BT.runtime() result = runtime.threads == BT.THREADS // 输出:true print result
注意事项
- start_time 是 BT 进程启动时间戳,单位秒。
- uptime 是当前时间减 start_time,单位秒。