diff options
| author | puuu <puuu@users.noreply.github.com> | 2016-11-07 14:47:16 +0900 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-11-08 02:01:05 +0300 |
| commit | 933198c55fdc4881198139676b61ff1f621cb39a (patch) | |
| tree | 3adb26b3bfdcb5f1ccb1d03bf8b8c4cd5c35131d | |
| parent | 1cc168d48736cca9326835eefb8b5ccdc4d63718 (diff) | |
docs/*/quickref.rst: Use new semantics of ticks_diff()
| -rw-r--r-- | docs/esp8266/quickref.rst | 2 | ||||
| -rw-r--r-- | docs/pyboard/quickref.rst | 2 | ||||
| -rw-r--r-- | docs/reference/speed_python.rst | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index 4a7ed3404..845a94ba7 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -83,7 +83,7 @@ Use the :mod:`time <utime>` module:: time.sleep_ms(500) # sleep for 500 milliseconds time.sleep_us(10) # sleep for 10 microseconds start = time.ticks_ms() # get millisecond counter - delta = time.ticks_diff(start, time.ticks_ms()) # compute time difference + delta = time.ticks_diff(time.ticks_ms(), start) # compute time difference Timers ------ diff --git a/docs/pyboard/quickref.rst b/docs/pyboard/quickref.rst index 3d08ae910..5f1a3a6e6 100644 --- a/docs/pyboard/quickref.rst +++ b/docs/pyboard/quickref.rst @@ -37,7 +37,7 @@ Use the :mod:`time <utime>` module:: time.sleep_ms(500) # sleep for 500 milliseconds time.sleep_us(10) # sleep for 10 microseconds start = time.ticks_ms() # get value of millisecond counter - delta = time.ticks_diff(start, time.ticks_ms()) # compute time difference + delta = time.ticks_diff(time.ticks_ms(), start) # compute time difference LEDs ---- diff --git a/docs/reference/speed_python.rst b/docs/reference/speed_python.rst index 2f1d16cea..8efba4702 100644 --- a/docs/reference/speed_python.rst +++ b/docs/reference/speed_python.rst @@ -132,7 +132,7 @@ The following enables any function or method to be timed by adding an def new_func(*args, **kwargs): t = time.ticks_us() result = f(*args, **kwargs) - delta = time.ticks_diff(t, time.ticks_us()) + delta = time.ticks_diff(time.ticks_us(), t) print('Function {} Time = {:6.3f}ms'.format(myname, delta/1000)) return result return new_func |
