Skip to content
Snippets Groups Projects
Commit 99eafa7e authored by Nadav Har'El's avatar Nadav Har'El Committed by Pekka Enberg
Browse files

clock: Use new clock APIs in msleep implementation


Fix msleep implementation to use the new <osv/clock.hh> APIs and the
monotonic clock.

Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent 3c30aa33
No related branches found
No related tags found
No related merge requests found
......@@ -86,8 +86,7 @@ int synch_port::_msleep(void *chan, struct mtx *mtx,
if (timo_hz) {
u64 nanoseconds = ticks2ns(timo_hz);
u64 cur_time = clock::get()->time();
t.set(cur_time + nanoseconds);
t.set(std::chrono::nanoseconds(nanoseconds));
}
trace_synch_msleep_wait(chan, timo_hz);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment