[vlc-commits] vlc_tick: add vlc_tick_from_timeval()
Steve Lhomme
git at videolan.org
Wed Jul 4 10:39:19 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul 4 10:23:28 2018 +0200| [928e966451d7217cee2f216a001578cd3928180a] | committer: Steve Lhomme
vlc_tick: add vlc_tick_from_timeval()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=928e966451d7217cee2f216a001578cd3928180a
---
include/vlc_tick.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/vlc_tick.h b/include/vlc_tick.h
index daa9a13633..6908126c7f 100644
--- a/include/vlc_tick.h
+++ b/include/vlc_tick.h
@@ -154,6 +154,11 @@ typedef int64_t msftime_t;
#define MSFTIME_FROM_VLC_TICK(vtk) ((vtk) * INT64_C(10000000) / CLOCK_FREQ)
#endif /* CLOCK_FREQ / 10000000 */
+static inline vlc_tick_t vlc_tick_from_timeval(const struct timeval *tv)
+{
+ return vlc_tick_from_sec( tv->tv_sec ) + VLC_TICK_FROM_US( tv->tv_usec );
+}
+
/*****************************************************************************
* MSTRTIME_MAX_SIZE: maximum possible size of mstrtime
More information about the vlc-commits
mailing list