Skip to content
Snippets Groups Projects
Commit 556e5dfd authored by Damien George's avatar Damien George
Browse files

docs/library/utime: Add more time functions for unix and esp8266 ports.

parent e0f7e001
Branches
Tags
No related merge requests found
...@@ -31,20 +31,20 @@ Functions ...@@ -31,20 +31,20 @@ Functions
which expresses a time as per localtime. It returns an integer which is which expresses a time as per localtime. It returns an integer which is
the number of seconds since Jan 1, 2000. the number of seconds since Jan 1, 2000.
.. only:: port_pyboard .. only:: port_unix or port_pyboard or port_esp8266
.. function:: sleep(seconds) .. function:: sleep(seconds)
Sleep for the given number of seconds. Seconds can be a floating-point number to Sleep for the given number of seconds. Seconds can be a floating-point number to
sleep for a fractional number of seconds. sleep for a fractional number of seconds.
.. only:: port_esp8266 or port_wipy .. only:: port_wipy
.. function:: sleep(seconds) .. function:: sleep(seconds)
Sleep for the given number of seconds. Sleep for the given number of seconds.
.. only:: port_wipy or port_pyboard .. only:: port_unix or port_pyboard or port_wipy or port_esp8266
.. function:: sleep_ms(ms) .. function:: sleep_ms(ms)
...@@ -64,10 +64,14 @@ Functions ...@@ -64,10 +64,14 @@ Functions
Just like ``ticks_ms`` above, but in microseconds. Just like ``ticks_ms`` above, but in microseconds.
.. only:: port_wipy or port_pyboard
.. function:: ticks_cpu() .. function:: ticks_cpu()
Similar to ``ticks_ms`` and ``ticks_us``, but with higher resolution (usually CPU clocks). Similar to ``ticks_ms`` and ``ticks_us``, but with higher resolution (usually CPU clocks).
.. only:: port_unix or port_pyboard or port_wipy or port_esp8266
.. function:: ticks_diff(old, new) .. function:: ticks_diff(old, new)
Measure period between consecutive calls to ticks_ms(), ticks_us(), or ticks_cpu(). Measure period between consecutive calls to ticks_ms(), ticks_us(), or ticks_cpu().
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment