Where is ticks_diff()?



  • Documention of utime module writes:

    Returns an increasing millisecond counter with arbitrary reference point, that wraps after some (unspecified) value. The value should be treated as opaque, suitable for use only with ticks_diff().

    but no ticks_diff() in utime.



  • @herbv said in Where is ticks_diff()?:

    @sakis

    What is the status with this. I've come to the same point. with missing "utime.ticks_add" and "utime.ticks_diff" it is quite useless to use ticks for calculating deatlines.

    Please go ahead, tx, Herbert

    Well, if you can read ticks itself you can write your own ticks_diff. It takes time, memory, etc. but may work as 'Plan B'.



  • @sakis

    What is the status with this. I've come to the same point. with missing "utime.ticks_add" and "utime.ticks_diff" it is quite useless to use ticks for calculating deatlines.

    Please go ahead, tx, Herbert



  • I also ran into this. Trying to make some periodic tasks found that hardware timers are not done and then found ticks_ms() and the reference to ticks_diff() but could not find anymore information.

    I do not think the reference needs to be removed from the documentation, but maybe a "*not implemented" note would be helpful.

    I am assuming this did not make it into the latest build (1.0.0.1?)



  • Hi,

    Good point, ticks_diff() is not implemented yet since we are waiting for some features from Espressif before we can add it. We'll remove the reference from the docs and add it back once it's there.

    Sorry for the confusion.


Log in to reply
 

Pycom on Twitter