Seconds, plus how we know them.
No constructor: Duration.measured(s) and Duration.projected(s) are the only doors,
so a provenance cannot be omitted. See the module docs.
Accessors
Section titled “Accessors”isMeasured
Section titled “isMeasured”Get Signature
Section titled “Get Signature”get isMeasured(): boolean;True only for a timed span. What CostReport.fullyMeasured reads.
Returns
Section titled “Returns”boolean
provenance
Section titled “provenance”Get Signature
Section titled “Get Signature”get provenance(): string;"measured" or "projected".
Returns
Section titled “Returns”string
seconds
Section titled “seconds”Get Signature
Section titled “Get Signature”get seconds(): number;The span in seconds, without its label.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”toString()
Section titled “toString()”toString(): string;Ns (provenance) — the label travels with the figure.
Returns
Section titled “Returns”string
measured()
Section titled “measured()”static measured(seconds: number): Duration;A timed phase: a clock ran and this is what it read.
Fallible because the float is — a negative or non-finite figure has no reading as a duration, and the refusal is the core’s, message and all.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
seconds |
number |
Returns
Section titled “Returns”Duration
projected()
Section titled “projected()”static projected(seconds: number): Duration;A hypothetical phase: an estimate’s input, or a documented minimum nobody timed.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
seconds |
number |
Returns
Section titled “Returns”Duration
Provenance
Section titled “Provenance”This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.