The StopWatch.ino example code gives the CPU time taken by AceButton.check() when nothing is happening. It'd be nice to get information about how much CPU time it takes to handle certain events,
like Click and DoubleClick. I think the only way to get that information is to insert stats variables into the AceButton class itself. I'd want something like average, min, max and the ability to reset the stats periodically, say every 5 seconds. I think one way to reduce the runtime cost of the stats gathering, and reduce static memory is to inject the "stats" object into AceButton and only do the calculation if the stats object is not null. So 2 more extra bytes on an 8-bit AVR.
The StopWatch.ino example code gives the CPU time taken by AceButton.check() when nothing is happening. It'd be nice to get information about how much CPU time it takes to handle certain events, like Click and DoubleClick. I think the only way to get that information is to insert stats variables into the AceButton class itself. I'd want something like average, min, max and the ability to reset the stats periodically, say every 5 seconds. I think one way to reduce the runtime cost of the stats gathering, and reduce static memory is to inject the "stats" object into AceButton and only do the calculation if the stats object is not null. So 2 more extra bytes on an 8-bit AVR.