feat(causal): wall-anchored timers — controller windows keep fixed wall length (RFC 007)
New timer anchor: insert_sleep_wall / scheduler::sleep_wall (exported) opt a Sleep entry out of the RFC 007 virtual-time shift, so it fires at its raw deadline regardless of injected delay. Featureless config is unchanged (the API exists but is identical to sleep). The causal controller's window/cooldown sleeps and the tsc_hz calibration sleep use it on the actor path (the OS-thread path was already wall). This fixes the controller's own sleeps dilating under its own injection — experiment windows stretched ~2x at 50% speedup (337ms -> 646ms injected/ window). Deltas were rate-normalized so results were unbiased; this fixes sweep cost, not bias. The general wall-anchored-timer-semantics jar item (user-facing opt-out) remains open; this lands the substrate. Test: wall_timer_ignores_injected_delay — wall entry fires at raw deadline while a virtual sibling in the same heap shifts. 13/13 causal, 34/34 binaries both feature configs.
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ pub use registry::{
|
||||
};
|
||||
pub use runtime::{init, Config, Runtime};
|
||||
pub use scheduler::{
|
||||
block_on_io, cancel_timer, request_stop, run, self_pid, send_after, send_after_named, sleep,
|
||||
block_on_io, cancel_timer, request_stop, run, self_pid, send_after, send_after_named, sleep, sleep_wall,
|
||||
spawn, spawn_addr, spawn_under, wait_readable, wait_readable_timeout, wait_writable,
|
||||
wait_writable_timeout, yield_now, FdArm, JoinError, JoinHandle,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user