time · function ·
TaskRun
Task run.
Measure monotonic time, represent durations, and budget frame work.
external TaskRun(task of int handle) -> durationMsStatus: source-declared
Parameters
task of int handle- Supply handle as task of int.
Measure a completed task
Measure a finished score calculation. Durations vary between runs.
cpu · task · timing · executed
using time
Score() -> int { return 40 + 2 }
task of int job = task Score()
wait job
durationMs elapsed = TaskRun(job)
Console.Log(elapsed.AsText())
project.mech
manifestVersion = "2"
package = "api.example.time__taskrun"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "time"
version = "0.1.0"
path = "../../../yeho/packages/time"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/time/time.yh:91