vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jul 4 18:24:16 2018 +0200| [6735a69b79e13180a8c0f4a06ffc6ec246e14b01] | committer: Steve Lhomme
vlc_tick: use a macro for vlc_tick_from_timespec() So we don't have to include extra headers for struct timespec (time.h). > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6735a69b79e13180a8c0f4a06ffc6ec246e14b01 --- include/vlc_tick.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/vlc_tick.h b/include/vlc_tick.h index c923e78976..a8db0f19a3 100644 --- a/include/vlc_tick.h +++ b/include/vlc_tick.h @@ -158,10 +158,8 @@ typedef int64_t msftime_t; #define vlc_tick_from_timeval(tv) \ (vlc_tick_from_sec( (tv)->tv_sec ) + VLC_TICK_FROM_US( (tv)->tv_usec )) -static inline vlc_tick_t vlc_tick_from_timespec(const struct timespec *tv) -{ - return vlc_tick_from_sec( tv->tv_sec ) + VLC_TICK_FROM_NS( tv->tv_nsec ); -} +#define vlc_tick_from_timespec(tv) \ + (vlc_tick_from_sec( (tv)->tv_sec ) + VLC_TICK_FROM_NS( (tv)->tv_nsec )) struct timespec timespec_from_vlc_tick(vlc_tick_t date); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
