blob: c1fb0ff26360c713b00cfb1093a5eb89d6b9924f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//! Support for running under an operating system that provides libstd, for testing.
extern crate std;
use std::{thread::sleep, time::Duration};
/// No-opped interrupt support.
///
/// TODO: Should this use Unix signals?
pub mod interrupts {
pub fn disable_interrupts() {}
}
/// Sleeps forever, in one-second chunks.
pub fn sleep_forever() -> ! {
loop {
sleep(Duration::from_secs(1));
}
}
|