[vlc-devel] [PATCH 01/10] vlc_tick: add helper function to convert milliseconds to/from vlc_tick_t
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jun 22 14:53:18 CEST 2018
---
include/vlc_tick.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/vlc_tick.h b/include/vlc_tick.h
index 8a7c6539c86..351119802e0 100644
--- a/include/vlc_tick.h
+++ b/include/vlc_tick.h
@@ -45,6 +45,9 @@
typedef int64_t vlc_tick_t;
typedef vlc_tick_t mtime_t; /* deprecated, use vlc_tick_t */
+#define VLC_TICK_FROM_MS(ms) ((ms) * (CLOCK_FREQ / 1000))
+#define MS_FROM_VLC_TICK(vtk) (((vtk) * 1000) / CLOCK_FREQ)
+
/*****************************************************************************
* MSTRTIME_MAX_SIZE: maximum possible size of mstrtime
*****************************************************************************
--
2.17.0
More information about the vlc-devel
mailing list