diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-02 02:01:30 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-09 22:22:28 -0700 |
commit | 4a6fbecab34616a7b16a859f9458a21b339bb6b0 (patch) | |
tree | 4ffc6a8f2732ac29e6e75d0677c93c2213db6948 /lib9p/tests | |
parent | fa10ceb13e66309ba24605dd5df91c4d626f0614 (diff) |
Have main() set `bootclock`
Diffstat (limited to 'lib9p/tests')
-rw-r--r-- | lib9p/tests/test_server/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib9p/tests/test_server/main.c b/lib9p/tests/test_server/main.c index f4b21db..b979a4b 100644 --- a/lib9p/tests/test_server/main.c +++ b/lib9p/tests/test_server/main.c @@ -10,6 +10,7 @@ #include <libcr/coroutine.h> #include <libhw/generic/net.h> #include <libhw/generic/alarmclock.h> +#include <libhw/host_alarmclock.h> #include <libhw/host_net.h> #include <libmisc/macro.h> #include <util9p/static.h> @@ -193,6 +194,11 @@ static COROUTINE init_cr(void *) { } int main() { + struct hostclock clock_monotonic = { + .vtable = &hostclock_vtable, + .clock_id = CLOCK_MONOTONIC, + }; + bootclock = &clock_monotonic; coroutine_add("init", init_cr, NULL); coroutine_main(); return 0; |