Skip to content
YosoiDocs

Duration

yosoi.policy.Duration

class Duration(Model):

Portable elapsed duration with seconds and subsecond nanoseconds.

Attributes: seconds: Unsigned u64 whole seconds, not an absolute timestamp. nanoseconds: Strict integer remainder below one billion; operation-specific positivity is checked separately.

Source: python/yosoi/policy.py:451

Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.

seconds: U64
nanoseconds: Annotated[int, Field(strict=True, ge=0, lt=1000000000)] = 0