Closed rolandvs closed 6 years ago
Actually they are reversed, and that is documented. The other inconsistency is the behaviour in exchanging the arguments to the call. In the MicroPython.org version, simply the sign is changed. In the Pycom version the result is told to be not valid, if the parameters are ticks_diff(new, old) instead of (old, new). I submitted a PR to make at least this behavior more robust.
Hello, The order of the parameters are swapped in development release 1.9.0.b4 (with uasyncio support), so they are consistent with the MicroPython implemented version of the function. Closing this issue.
I use both pyboard and xxPy, running both micropython. I used some code cross-boards as far as possible, and I ran into a minor annoyance for a function in
utime
calledticks_diff()
that really doesn't have to be different at all.The micropython of Pycom reverses the order of the arguments, whereas the implementation on the original micropython platform uses the IMHO right way to do this. Just to illustrate:
micropython's way
Pycom's micropython way