blob: 9bfcaa981f961af7d5cd2efe4fd911a47116366b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <lib/klib.h>
#include <comus/time.h>
void kspin_sleep_seconds(size_t seconds)
{
const uint64_t start = unixtime();
while (1) {
const uint64_t now = unixtime();
if (now - start > seconds) {
return;
}
}
}
|