#[unsafe(no_mangle)]pub unsafe extern "C" fn test_clock_set_timer(
clock: &mut TestClock_API,
name_ptr: *const c_char,
interval_ns: u64,
start_time_ns: UnixNanos,
stop_time_ns: UnixNanos,
callback_ptr: *mut PyObject,
allow_past: u8,
fire_immediately: u8,
)
Expand description
§Safety
This function assumes:
name_ptr
is a valid C string pointer.callback_ptr
is a validPyCallable
pointer.
§Parameters
start_time_ns
: UNIX timestamp in nanoseconds. Use0
to indicate “use current time”.stop_time_ns
: UNIX timestamp in nanoseconds. Use0
to indicate “no stop time”.
§Panics
Panics if callback_ptr
is null or represents the Python None
object.