hydra.time module
A model for points in time.
- class hydra.time.Timespec(seconds: Annotated[int, 'Whole seconds since the Unix Epoch; signed, so instants in the far past or distant future are representable'], nanoseconds: Annotated[int, 'Nanoseconds within the second, in the range [0, 999999999]; unsigned, as the value is never negative'])
Bases:
objectThe POSIX struct timespec, with the same semantics: an instant in time as a number of seconds and nanoseconds since the Unix Epoch (1970-01-01T00:00:00Z). The actual resolution is implementation- and filesystem-defined. See <time.h> (https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html) and XBD section 4.19, “Seconds Since the Epoch” (https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_19).
- class Builder(_seconds: 'int' = None, _nanoseconds: 'int' = None)
Bases:
object- build()
- nanoseconds(nanoseconds)
- seconds(seconds)
- NANOSECONDS = Name(value='nanoseconds')
- SECONDS = Name(value='seconds')
- TYPE_ = Name(value='hydra.time.Timespec')
- static builder()
- nanoseconds: Annotated[int, 'Nanoseconds within the second, in the range [0, 999999999]; unsigned, as the value is never negative']
- seconds: Annotated[int, 'Whole seconds since the Unix Epoch; signed, so instants in the far past or distant future are representable']
- with_nanoseconds(nanoseconds)
- with_seconds(seconds)