From cc69ca1a9bb0d66a79dd02f5f4c1bf8079d6ca40 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Fri, 1 Oct 2021 15:41:53 +0200 Subject: [PATCH] sys: time_units: Add SYS_FOREVER_US macro Add macro for representing forever timeout in microseconds. Macro is similar to already existing SYS_FOREVER_MS. Signed-off-by: Krzysztof Chruscinski --- include/sys/time_units.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/time_units.h b/include/sys/time_units.h index 0963a6ba427..f719230ed29 100644 --- a/include/sys/time_units.h +++ b/include/sys/time_units.h @@ -20,6 +20,12 @@ extern "C" { */ #define SYS_FOREVER_MS (-1) +/** @brief System-wide macro to denote "forever" in microseconds + * + * See @ref SYS_FOREVER_MS. + */ +#define SYS_FOREVER_US (-1) + /** @brief System-wide macro to convert milliseconds to kernel timeouts */ #define SYS_TIMEOUT_MS(ms) ((ms) == SYS_FOREVER_MS ? K_FOREVER : K_MSEC(ms))