nuttx/clock.h: add USEC2MSEC macro for microsecond to millisecond conversion

Add USEC2MSEC macro to provide a convenient and consistent interface for
converting microseconds to milliseconds, complementing the existing SEC, USEC,
and NSEC conversion macros and improving code readability.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang
2025-02-26 15:40:58 +08:00
committed by Xiang Xiao
parent a4315fbb45
commit fe5cf5b03e
+4
View File
@@ -217,6 +217,10 @@
#define MSEC2SEC(usec) div_const(msec, MSEC_PER_SEC)
/* USEC2MSEC */
#define USEC2MSEC(usec) div_const(usec, USEC_PER_MSEC)
/* USEC2SEC */
#define USEC2SEC(usec) div_const(usec, USEC_PER_SEC)