mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
libc: Unify the selection of inline or macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I44a26550ff856af07d2d96a6f0a6066f988d6da3
This commit is contained in:
+2
-2
@@ -201,8 +201,8 @@ int clock_settime(clockid_t clockid, FAR const struct timespec *tp);
|
||||
int clock_gettime(clockid_t clockid, FAR struct timespec *tp);
|
||||
int clock_getres(clockid_t clockid, FAR struct timespec *res);
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline int timespec_get(FAR struct timespec *t, int b)
|
||||
#ifdef CONFIG_HAVE_INLINE
|
||||
static inline int timespec_get(FAR struct timespec *t, int b)
|
||||
{
|
||||
return b == TIME_UTC ? (clock_gettime(CLOCK_REALTIME, t), b) : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user