summaryrefslogtreecommitdiff
path: root/libhw/host_bootclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhw/host_bootclock.c')
-rw-r--r--libhw/host_bootclock.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/libhw/host_bootclock.c b/libhw/host_bootclock.c
deleted file mode 100644
index ca9565c..0000000
--- a/libhw/host_bootclock.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* libhw/host_bootclock.c - <libhw/generic/bootclock.h> implementation for POSIX hosts
- *
- * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-#include <assert.h>
-#include <time.h> /* for clock_gettime(), CLOCK_MONOTONIC, struct timespec */
-
-#include <libhw/generic/bootclock.h>
-
-uint64_t bootclock_get_ns(void) {
- struct timespec ts;
- int r;
-
- r = clock_gettime(CLOCK_MONOTONIC, &ts);
- assert(r == 0);
-
- return (((uint64_t)ts.tv_sec) * NS_PER_S) + (uint64_t)ts.tv_nsec;
-}