Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Measure time it takes talking to I2C device?

Hi, in my project I need to poll an I2C distance sensor as often as I can. Preferrably tens or hundreds of times pr second.

How can I, in my C++ Mongoose OS sourcecode, figure out exactly how long one polling takes? Is there a precise method I can call before and after my call to the sensor, to see how many milliseconds it takes?

Comments

Sign In or Register to comment.