eRCaGuy_TimerCounter
eRCaGuy_TimerCounter copied to clipboard
Recommend using Multiply vs Divide in get_micros()
On Arduinos multiply is about 39x faster than divide. Thus multiplying by 0.50 rather than dividing by 2.0 might make a difference on the get_micros() routine.
yeah I think you're right. Here's some more speed test info: https://playground.arduino.cc/Main/ShowInfo. Really though I recommend you just use get_count() if you want good speed. Avoid the floating point operations altogether. I made get_micros() return a float essentially for those less experienced who are likely using floating point variables and math instead of integer math anyway.
I'll fix it anyway when I get the chance.