@anotherusername said in PSA: don't use TI-nspire calculators for encryption:
@cursorkeys if you're measuring the elapsed time using a busy loop on an embedded processor that's solely dedicated to running your loop, the number of times your loop executes will be directly proportional to the elapsed time. Just increment a counter inside the loop.
Absolutely, although that can be inaccurate on some µPs. On the PIC32, for instance, DMA to FLASH will cause a core stall when it writes, so if you're doing lots of DMA the core 'speed' seen by that loop will be variable even if the execution time for the instructions in that loop is static. That was to see, I had a bog standard super-loop program and was toggling a pin at the start of the loop, the period varied when the I2C bus received.
On an old Holtek micro I had to have single-cycle accuracy for some radio stuff, every single execution path had to charted and then padded with NOPs to get all branches the same length.
I love embedded stuff, never boring if you have to fight both hardware and software to the death on a project.