We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sleep
basic
1 parent fd6ad85 commit 19c2855Copy full SHA for 19c2855
examples/basic/src/main.rs
@@ -4,7 +4,7 @@
4
#![feature(const_mut_refs)]
5
#![feature(unsafe_block_in_unsafe_fn)] // `unsafe fn` doesn't imply `unsafe {}`
6
#![deny(unsafe_op_in_unsafe_fn)]
7
-use constance::{kernel::Task, sync::Mutex};
+use constance::{kernel::Task, prelude::*, sync::Mutex};
8
9
constance_port_std::use_port!(unsafe struct System);
10
@@ -43,5 +43,8 @@ fn task1_body(_: usize) {
43
}
44
45
fn task2_body(_: usize) {
46
- dbg!();
+ loop {
47
+ dbg!(System::time().unwrap());
48
+ System::sleep(constance::time::Duration::from_secs(1)).unwrap();
49
+ }
50
0 commit comments