function similar %timeit

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 22
Joined: Sat Jun 20, 2015 11:48 am

function similar %timeit

Post by stmfresser » Fri Aug 19, 2016 5:28 pm

i would calculate the time of operation. Is there any function like %timeit ?

User avatar
Posts: 4924
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: function similar %timeit

Post by pythoncoder » Sat Aug 20, 2016 5:35 am

This allows any function to be timed by prefixing it with a decorator ...
Peter Hinch

Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: function similar %timeit

Post by pfalcon » Sat Aug 20, 2016 1:20 pm

It's unclear what "%timeit" is. The port standard of standard Python module "timeit" exists in micropython-lib: ... ter/timeit
Awesome MicroPython list
Pycopy - A better MicroPython
MicroPython standard library for all ports and forks -
More up to date docs -

Post Reply