This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit fe5cf5b03e10bd33ae899339d5ebfef8e8d7f4f6
Author: Bowen Wang <[email protected]>
AuthorDate: Wed Feb 26 15:40:58 2025 +0800

    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 <[email protected]>
---
 include/nuttx/clock.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/nuttx/clock.h b/include/nuttx/clock.h
index 6c176e6ef06..ec6a3a3a63e 100644
--- a/include/nuttx/clock.h
+++ b/include/nuttx/clock.h
@@ -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)

Reply via email to