<html><head></head><body>You probably need to rename mdate() to vlc_time() or something. Then mwait() and msleep() too...<br><br><div class="gmail_quote">Le 18 juin 2018 14:52:33 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">OK I'll go with ms/us/ns then.<br><br>It should allow using vlc_tick_from_ms() and such. It's reasonably sized.<br><br><br>On 2018-06-18 11:57 AM, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> There are no such thing as an "other way". If you hide the unit of the <br> time type, then you have to expose the unit of the conversions to and <br> from it.<br><br> Milli is not a unit. It's a fixed point representation. If you use <br> tick as the unit, then milli means millitick, not millisecond. Talk <br> about confusing.<br><br> On top of that, ms/us/ns are shorter than milli/micro/nano.<br><br> Le 18 juin 2018 09:58:14 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a <br> écrit :<br><br>     On 2018-06-16 10:53 AM, Rémi Denis-Courmont wrote:<br><br>         Le lauantaina 16. kesäkuuta 2018, 11.32.50 EEST Steve Lhomme a<br>         écrit :<br><br>             On 2018-06-16 10:23 AM, Rémi Denis-Courmont wrote:<br><br>                 Le lauantaina 16. kesäkuuta 2018, 10.34.18 EEST Steve<br>                 Lhomme a écrit :<br><br>                     I used milli instead of ms so it's not confused<br>                     with msftime_t. And so micro and nano seems like<br>                     logical siblings. <br><br>                 Then keep mtime and screw this series. <br><br>             I find mtime misleading. Especially because it assumes a<br>             certain value and in many parts of the code 1000 or<br>             1000000 is used instead of proper conversion because what<br>             could possibly go wrong ? <br><br>         Well, these things regularly go wrong: - failing to convert,<br>         typically the caching values between ms and µs, - failing to<br>         expand before computation, typically from 32-bits to 64-bits.<br>         mtime_t is not a particularly good name, but it's anyway<br>         assumed same as int64_t all over the place, so the name does<br>         not matter than much.<br><br>             With a tick (or something else) you know you have to take<br>             care of a conversion in the proper time format you're<br>             handling. <br><br>         But that's exactly the point. If you use tick, jiffy or<br>         whatever other non- standard unit, then you have to define<br>         what the other unit is. <br><br><br>     I see it the other way. One should not know what a tick is nor the<br>     precision it can have. The API around it should hide all the<br>     intricacies. The fact the name implies it's in microseconds lead to a<br>     lot of dirty code we have right now.<br><br>         That's why ns, us/µs, ms are far better names than nano, micro<br>         and milli. <br><br><br>     I would like nsec, msec and µsec but it's not possible and using ms may<br>     lead to confusion. And us doesn't sound anything like µs it just looks<br>     the same.<br><br>             mtime_t will stay for backward compatibility but IMO it<br>             should not be used anymore. <br><br>         I don't mind changing the name to something short and<br>         correctly namespaced. But it would be utterly vain in any<br>         case. The code assumes int64_t in a variety of subtle and<br>         not-so-subtle ways, no matter the typedef alias. <br><br><br>     This is all fixed. Seehttps://code.videolan.org/robUx4/vlc/tree/clock/43<br><br>                 As far as I am concerned, if you don't specify the<br>                 time unit in a computer program, you are using local<br>                 jiffies, not seconds. Talk about confusing. ISO C uses<br>                 nsec, not nano. SI uses ms, µs and ns with us as the<br>                 defacto standard transliteration of µs. <br><br>             We could use nsec instead of nano to align with the<br>             standard. But then msec could be either milliseconds or<br>             microseconds. <br><br>         Not really. VLC did confuse m for micro. But in the standards,<br>         it's always u/µ for micro and m for milli.<br><br><br><br>     I don't like it. But if everyone agrees on this fine. I can change that<br>     easily in my patches.<br><hr><br><br>     vlc-devel mailing list<br>     To unsubscribe or modify your subscription options:<br>     <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br><br> -- <br> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez <br> excuser ma brièveté.<br><br><br><hr><br> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><br><hr><br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>