LoopStatistics


loopstatistics

created terry myers jan 2016

v1.0

calculate average, minimum, , maximum loop time in order determine performance of code

functions :

call loopstatistics.tick(bool print==false) once , once each loop.
     set print 1 automatically call printstatistics once second
float loopstatistics.avg() return average loop time in ms calculated during last 1 second interval
float loopstatistics.min() return fastest loop time in ms recorded during last 1 second interval
float loopstatistics.max() return slowest loop time un ms recorded during last 1 second interval
uint32_t loopstatistics.loopspersec() number of loops occured during last 1 second interval
     tip: call once second or so, or pass in 1 tick().
void printstatistics() - prints of above serial monitor


note: function technically interferes calcluating loop time without function. when printing statistics serial monitor takes 2.5ms


https://github.com/terryjmyers/loopstatistics.git



Arduino Forum > Development > Other Software Development > LoopStatistics


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor