MCPcopy Index your code
hub / github.com/FrameworkComputer/framework-system / sleep

Function sleep

framework_lib/src/os_specific.rs:41–53  ·  view source on GitHub ↗

Sleep a number of microseconds

(micros: u64)

Source from the content-addressed store, hash-verified

39
40/// Sleep a number of microseconds
41pub fn sleep(micros: u64) {
42 let duration = Duration::from_micros(micros);
43 #[cfg(not(feature = "uefi"))]
44 {
45 thread::sleep(duration);
46 }
47 #[cfg(feature = "uefi")]
48 {
49 // TODO: It's not recommended to use this for sleep more than 10ms
50 // Should use a one-shot timer event
51 uefi::boot::stall(duration);
52 }
53}

Callers 11

get_versionFunction · 0.85
authenticate_batteryMethod · 0.85
wait_to_reappearFunction · 0.85
retimer_enable_fwupdMethod · 0.85
read_ec_flashMethod · 0.85
set_gpu_descriptorMethod · 0.85
console_readMethod · 0.85
wait_for_readyFunction · 0.85
run_with_argsFunction · 0.85
selftest_retimerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected