[vlc-devel] [vlc-commits] vlc_tick: add vlc_tick_from_timeval()
Rémi Denis-Courmont
remi at remlab.net
Wed Jul 4 16:20:41 CEST 2018
timeval is not an ISO type, unlike timespec. Expect problems and consider using a macro.
Le 4 juillet 2018 11:39:19 GMT+03:00, Steve Lhomme <git at videolan.org> a écrit :
>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
>
>_______________________________________________
>vlc-commits mailing list
>vlc-commits at videolan.org
>https://mailman.videolan.org/listinfo/vlc-commits
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180704/0ac2d8db/attachment.html>
More information about the vlc-devel
mailing list