ChronaxisUser manual中文
On this pagechecked_add_nsSource locations

chronaxis.checked_add_ns

Import this object from chronaxis. This page covers its directly public members and necessary construction/context protocols. See the Chinese implementation reference for internals. Return to the public API index. Check required parameters, defaults, returns, and exceptions before calling.

checked_add_ns

Add a fixed offset to a nanosecond coordinate, checking the int64 range.

python
checked_add_ns(time_ns: int, offset_ns: int) -> int
Name Type Required Default Purpose, choices, and effect
time_ns int Yes No default Positional or keyword. Original int64 coordinate in nanoseconds.
offset_ns int Yes No default Positional or keyword. Int64 offset in nanoseconds.

Returns the exact new integer coordinate. Successful addition does not establish synchronization between sources.

Raises TypeError if either argument is not a non-boolean integer. Raises TimeOverflowError if either argument or the sum is outside int64.

Source locations

Chronaxis user manual · Offline edition