From b8360ad5ee2f180966685ff729f955c2e7ebe355 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sat, 19 Oct 2024 22:06:27 +1000 Subject: [PATCH] sys_clock: extra time defines Add additional time defines to round out the `SEC_PER_*` family. These are easier to type than `SEC_PER_MIN * MIN_PER_HOUR` and `SEC_PER_MIN * MIN_PER_HOUR * HOUR_PER_DAY`. Signed-off-by: Jordan Yates --- include/zephyr/sys_clock.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/zephyr/sys_clock.h b/include/zephyr/sys_clock.h index 56d67446af0b..36abcff9f874 100644 --- a/include/zephyr/sys_clock.h +++ b/include/zephyr/sys_clock.h @@ -94,6 +94,12 @@ typedef struct { /** number of seconds per minute */ #define SEC_PER_MIN 60U +/** number of seconds per hour */ +#define SEC_PER_HOUR 3600U + +/** number of seconds per day */ +#define SEC_PER_DAY 86400U + /** number of minutes per hour */ #define MIN_PER_HOUR 60U