diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-30 23:15:28 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-30 23:15:28 +0300 |
commit | 153665f1595af8c0d3c0ec0602c0486992a4a9cf (patch) | |
tree | e3c4c64c2ee8eb915ad38c5744a296c238a9a474 | |
parent | 7219a18d175f993d540c1897d3cd23cfd2a2e118 (diff) | |
download | micropython-153665f1595af8c0d3c0ec0602c0486992a4a9cf.tar.gz micropython-153665f1595af8c0d3c0ec0602c0486992a4a9cf.zip |
docs/utime: Document ticks_cpu() in more detail.
Also, drop ::only directive.
-rw-r--r-- | docs/library/utime.rst | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/docs/library/utime.rst b/docs/library/utime.rst index 8310673830..3eff4cd756 100644 --- a/docs/library/utime.rst +++ b/docs/library/utime.rst @@ -90,11 +90,18 @@ Functions Just like ``ticks_ms`` above, but in microseconds. -.. only:: port_wipy or port_pyboard - - .. function:: ticks_cpu() - - Similar to ``ticks_ms`` and ``ticks_us``, but with higher resolution (usually CPU clocks). +.. function:: ticks_cpu() + + Similar to ``ticks_ms`` and ``ticks_us``, but with the highest possible resolution + in the system. This is usually CPU clocks, and that's why the function is named that + way. But it doesn't have to a CPU clock, some other timing source available in a + system (e.g. high-resolution timer) can be used instead. The exact timing unit + (resolution) of this function is not specified on ``utime`` module level, but + documentation for a specific port may provide more specific information. This + function is intended for very fine benchmarking or very tight real-time loops. + Avoid using it in portable code. + + Availability: Not every port implement this function. .. only:: port_unix or port_pyboard or port_wipy or port_esp8266 |