// Demonstrate the low-level 'Ticker' profiler
//
// Note that in many cases the 'Profile' object is more useful than
// the 'Ticker' object, but since Profile is built on top of Ticker,
// the latter is shown first.

void setup() {
  // Nothing to do
}

void loop() {
  Ticker.reset();       // Reset low-level counters
  delay(10*1000);       // Wait ten seconds to collect some data
  pprintf("%d %d %d\n", // Report microseconds in selected categories --
          Ticker.getUsec(TICKER_PACKET_HANDLER),  // packet handling
          Ticker.getUsec(TICKER_ALARM_HANDLER),   // alarm handling
          Ticker.getUsec(TICKER_BACKGROUND));     // loop, etc
  delay(200);           // Wait a bit for that output to ship..
}
