From 4a6fbecab34616a7b16a859f9458a21b339bb6b0 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 2 Feb 2025 02:01:30 -0700 Subject: Have main() set `bootclock` --- lib9p/tests/test_server/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib9p/tests') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3-2-g168b