From 6c114930eef133293856189a93f7ca7ca3751268 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 29 Oct 2024 20:20:07 -0600 Subject: wip host_alarmclock --- libhw/host_bootclock.c | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 libhw/host_bootclock.c (limited to 'libhw/host_bootclock.c') 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 - implementation for POSIX hosts - * - * Copyright (C) 2024 Luke T. Shumaker - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -#include -#include /* for clock_gettime(), CLOCK_MONOTONIC, struct timespec */ - -#include - -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; -} -- cgit v1.2.3-2-g168b