Calculating delta time

Robin2:
On an Arduino floating point maths is very slow as is integer division. They should be avoided if at all possible if performance matters.

If you can organize the maths so that divisions can be by values which are a power of 2 (e.g. 2, 4. 8. 16 etc) you can use the right shift instruction. For example >> 6 shifts the value to the right by 6 places which is equivalent to dividing by 64 (26 = 64) and that instruction is very fast.

...R

Ah, this is something completely new to me. That's a clever way of dividing. Thanks for letting me know about that! So is multiplying a slow process too? Should left-shifting be used instead for that?

I'm glad I've found the Arduboy really as I think it's limitations are going to be quite beneficial for learning.