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 an arbitrary starting point (process start). Uses a monotonic clock - values always increase, unaffected by system clock changes. Perfect for measuring elapsed time.

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)