rustubs/kthread/
lazy.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! read input buffer and print
use crate::kthread::KThread;
use crate::machine::time;
use crate::proc::task::Task;
/// test system bellringer
pub struct Lazy {}

impl KThread for Lazy {
	fn entry() -> ! {
		let t = Task::current().unwrap();
		loop {
			sprintln!("CLOCK: {} s", time::sec());
			t.nanosleep(1_000_000_000);
		}
	}
}