Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LibertyOS-Development/kernel
/ sleep
Function
sleep
src/time.rs:121–129 ·
view source on GitHub ↗
Sleep
(sec: f64)
Source
from the content-addressed store, hash-verified
119
120
// Sleep
121
pub fn sleep(sec: f64)
122
{
123
let start = crate::clock::uptime();
124
125
while crate::clock::uptime() - start < sec
126
{
127
halt();
128
}
129
}
130
131
132
// Wait (in nanoseconds)
Callers
1
init
Function · 0.70
Calls
2
halt
Function · 0.85
uptime
Function · 0.70
Tested by
no test coverage detected