mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 15:30:25 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user