pub fn sleep(ticks: u32)Expand description
Make current thread sleep for ticks ticks. Current thread will be put in Sleeping
state and another thread will be scheduled immediately. Current thread will not be considered
for scheduling until tick() is called at least tick times.
ยงExample
let mut stack1 = [0xDEADBEEF; 512];
let _ = create_thread(
&mut stack1,
|| {
loop {
let _ = hprintln!("in task 1 !!");
sleep(50);
}
});