-
Notifications
You must be signed in to change notification settings - Fork 0
API console
Liu.Yandong.Hanks edited this page Aug 19, 2026
·
3 revisions
输出与命名计时
Output and named timing
Overview
console 将脚本诊断输出交给宿主配置的标准输出、标准错误输出和计时器。它适合诊断和开发,不应成为高频热路径的一部分。
consolesends script diagnostics to the host-configured standard output, standard error output, and timers. It is intended for diagnostics and development, not a hot execution path.
Parameters:
-
values
零个或多个待输出值。Zero or more values to write.
Returns
null。
null.
console.log("loaded", 3);
return 0;Parameters:
-
values
零个或多个错误输出值。Zero or more values to write to standard error.
Returns
null。
null.
console.error("invalid input", 42);
return 0;Parameters:
-
label
计时器名称;应与timeEnd使用同一名称。Timer name; use the same name with
timeEnd.
Returns
null。
null.
console.time("build");
return 0;Parameters:
-
label
要停止的计时器名称。Name of the timer to stop.
Returns
null,并写入经过时间。
null, while writing elapsed time.
console.time("work");
var value = 20 + 22;
console.timeEnd("work");
return value;AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License