Module datetime

Source
Expand description

Thin FFI wrappers around the date/time conversion utilities in nautilus-core.

The Rust implementation already lives in crate::datetime; this module simply exposes the conversions to C (and, by extension, to Python via Cython) while keeping the behaviour and the documentation in one place. Each exported function forwards directly to its Rust counterpart and therefore inherits the same semantics and safety guarantees.

Functions§

micros_to_nanos
Converts microseconds (μs) to nanoseconds (ns).
millis_to_nanos
Converts milliseconds (ms) to nanoseconds (ns).
nanos_to_micros
Converts nanoseconds (ns) to microseconds (μs).
nanos_to_millis
Converts nanoseconds (ns) to milliseconds (ms).
nanos_to_secs
Converts nanoseconds (ns) to seconds.
secs_to_millis
Converts seconds to milliseconds (ms).
secs_to_nanos
Converts seconds to nanoseconds (ns).
unix_nanos_to_iso8601_cstr
Converts a UNIX nanoseconds timestamp to an ISO 8601 (RFC 3339) format C string pointer.
unix_nanos_to_iso8601_millis_cstr
Converts a UNIX nanoseconds timestamp to an ISO 8601 (RFC 3339) format C string pointer with millisecond precision.