Skip to main content

wait_timeout

Function wait_timeout 

Source
pub fn wait_timeout<F>(event_mask: u64, duration: Duration, should_wake_up: F)
where F: Fn() -> bool,
🔬This is a nightly-only experimental API. (sgx_platform #56975)
Available on Fortanix and SGX only.
Expand description

Makes an effort to wait for a non-spurious event at least as long as duration.

Note that in general there is no guarantee about accuracy of time and timeouts in SGX model. The enclave runner serving usercalls may lie about current time and/or ignore timeout values.

Once the event is observed, should_wake_up will be used to determine whether or not the event was spurious.