@@ -695,8 +695,8 @@ pub trait Handler: Send + Sync {
/// 100 microseconds.
fn stall(&self, microseconds: u64);
- /// Sleep for at least the given number of **milliseconds**. An implementation may round to the closest sleep time
- /// supported, and should relinquish the processor.
+ /// Sleep for at least the given number of **milliseconds**. An implementation may round to the closest sleep
+ /// time supported, and should relinquish the processor.
fn sleep(&self, milliseconds: u64);
fn handle_fatal_error(&self, fatal_type: u8, fatal_code: u32, fatal_arg: u64) {
@@ -68,6 +68,12 @@ impl Handler for TestHandler {
fn write_pci_u32(&self, _segment: u16, _bus: u8, device: u8, _function: u8, _offset: u16, _value: u32) {
unimplemented!()
}
+ fn stall(&self, _microseconds: u64) {
+ unimplemented!()
+ }
+ fn sleep(&self, _milliseconds: u64) {
pub(crate) fn make_test_context() -> AmlContext {
@@ -310,4 +310,11 @@ impl aml::Handler for Handler {
fn write_pci_u32(&self, segment: u16, bus: u8, device: u8, function: u8, _offset: u16, value: u32) {
println!("write_pci_u32 ({segment:#x}, {bus:#x}, {device:#x}, {function:#x})<-{value:#x}");
+
+ fn stall(&self, microseconds: u64) {
+ println!("Stalling for {}us", microseconds);
+ fn sleep(&self, milliseconds: u64) {
+ println!("Sleeping for {}ms", milliseconds);