Skip to content
StatePath
All data types

duration

A length of time measured in seconds — how long to wait, or how long something lasted.

  • SCALAR

What is it

A seconds-denominated span (TimeDomain.DURATION_SECONDS). Only seconds belong here: a span counted in days or bars is a plain num (see num.duration).

  • SCALARtime.durationint64

What is it a kind of

Any tool that accepts time accepts this.

Siblings

Who makes it

No tool makes this type directly.

Who takes it

Through time
28 tools take any time

How do I turn it into something else

Fromtime.duration
Needs a tool

Clock

time.epochseconds since 1970 (UTC)EPOCH_SECONDSwhen did it happen
time.bara bar index on the chartBAR_INDEXhow many bars ago
time.durationa span in secondsDURATION_SECONDShow long

These never mix: a bar index is not a time, and a duration is not a date. The validator refuses a wire between two clock domains, and nothing converts between them — compute the other one with a time tool.