rustubs/kthread/lazy.rs
1//! read input buffer and print
2use crate::kthread::KThread;
3use crate::machine::time;
4use crate::proc::task::Task;
5/// test system bellringer
6pub struct Lazy {}
7
8impl KThread for Lazy {
9 fn entry() -> ! {
10 let t = Task::current().unwrap();
11 loop {
12 sprintln!("CLOCK: {} s", time::sec());
13 t.nanosleep(1_000_000_000);
14 }
15 }
16}