mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
docs/*/quickref.rst: Use new semantics of ticks_diff()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user