ostk.physics.time.Duration¶
- class Duration(self, arg: datetime.timedelta, /)¶
- class Duration(self, duration: ostk.physics.time.Duration)
Bases:
objectDuration format.
Overloaded function.
__init__(self, arg: datetime.timedelta, /) -> NoneConstructor. Args:
count (int): A nanosecond count.
__init__(self, duration: ostk.physics.time.Duration) -> NoneCopy constructor.
- Args:
duration (Duration): The Duration.
Attributes
Get the absolute duration.
Get the day count.
Get the hour count.
Get the microsecond count.
Get the millisecond count.
Get the minute count.
Get the nanosecond count.
Get the second count.
Get the week count.
Get the duration in days.
Get the duration in hours.
Get the duration in microseconds.
Get the duration in milliseconds.
Get the duration in minutes.
Get the duration in nanoseconds.
Get the duration in seconds.
Get the duration in a unit.
Get the duration in weeks.
Check if the duration is near another duration.
Check if the duration is positive.
Check if the duration is strictly positive.
Check if the duration is zero.
- class Format(
- value,
- names=None,
- *,
- module=None,
- qualname=None,
- type=None,
- start=1,
- boundary=None,
- names=None,
Bases:
Enum- Standard = 0¶
- ISO8601 = 1¶
- __add__¶
- __mul__¶
- between = <nanobind.nb_func object>¶
- days = <nanobind.nb_func object>¶
- hours = <nanobind.nb_func object>¶
- in_microseconds¶
Get the duration in microseconds.
- Returns:
Duration in microseconds.
- Return type:
- in_milliseconds¶
Get the duration in milliseconds.
- Returns:
Duration in milliseconds.
- Return type:
- in_nanoseconds¶
Get the duration in nanoseconds.
- Returns:
Duration in nanoseconds.
- Return type:
- is_near¶
Check if the duration is near another duration.
- is_strictly_positive¶
Check if the duration is strictly positive.
- Returns:
True if strictly positive.
- Return type:
- microseconds = <nanobind.nb_func object>¶
- milliseconds = <nanobind.nb_func object>¶
- minutes = <nanobind.nb_func object>¶
- nanoseconds = <nanobind.nb_func object>¶
- parse = <nanobind.nb_func object>¶
- seconds = <nanobind.nb_func object>¶
- to_string¶
- to_timedelta¶
- weeks = <nanobind.nb_func object>¶
- zero = <nanobind.nb_func object>¶