summaryrefslogtreecommitdiff
path: root/libhw/host_bootclock.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-29 20:20:07 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-29 20:20:07 -0600
commit6c114930eef133293856189a93f7ca7ca3751268 (patch)
treedfb880db4838503ce8d0ac79b8fa56a0f2624fa1 /libhw/host_bootclock.c
parentbcaf0bc655df337bc02c5dd78bfc3f4487103959 (diff)
wip host_alarmclock
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;
-}