From a1f7445808e705ead596cae6200d2416e6bd4eaf Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 14 Oct 2024 23:09:03 +0200 Subject: [PATCH] Mon 14 Oct 23:06:38 CEST 2024 --- kernel/clock.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 kernel/clock.h diff --git a/kernel/clock.h b/kernel/clock.h new file mode 100644 index 0000000..f931244 --- /dev/null +++ b/kernel/clock.h @@ -0,0 +1,22 @@ +/* +Copyright (C) 2015-2019 The University of Notre Dame +This software is distributed under the GNU General Public License. +See the file LICENSE for details. +*/ + +#ifndef CLOCK_H +#define CLOCK_H + +#include "kernel/types.h" + +typedef struct { + uint32_t seconds; + uint32_t millis; +} clock_t; + +void clock_init(); +clock_t clock_read(); +clock_t clock_diff(clock_t start, clock_t stop); +void clock_wait(uint32_t millis); + +#endif