patch_seq_time_nanos

Function patch_seq_time_nanos 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_time_nanos(stack: Stack) -> Stack
Expand description

Get monotonic nanoseconds for precise timing

Stack effect: ( – Int )

Returns nanoseconds from system boot (CLOCK_MONOTONIC). Uses raw clock_gettime for consistent values across all threads - critical for timing when coroutines migrate between OS threads.

Note: Saturates at i64::MAX (~292 years of uptime) to prevent overflow.

§Safety

  • stack must be a valid stack pointer (may be null for empty stack)