mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00: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:
parent
a4315fbb45
commit
fe5cf5b03e
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue