OpenComputers 会覆盖部分 Lua os 表行为,使其反映游戏内时间语义,而不是宿主操作系统时间。
- 仓库:
opencomputers - 类型: 核心运行时接口
OpenComputers/src\main\scala\li\cil\oc\server\machine\luac\OSAPI.scala
print(os.clock())
print(os.date())- 说明: 返回机器已消耗的 CPU 时间。
- 说明: 格式化游戏内时间戳,或返回日期表。
- 说明: 返回当前游戏内时间戳,或转换日期表。
computercomponentosunicode