+ // Performance testing
+ //uint64_t prev = 0, due = 0;
+ //uint64_t worst[10] = {};
+ //int count = 0;
+ //while (true) {
+ // uint64_t local = tdma_time();
+ // if (prev && (local-prev) > worst[count])
+ // worst[count] = (local-prev);
+ // prev = local;
+ // if (local > due) {
+ // if (count == 5) {
+ // static char str[] = "background background background\r\n";
+ // sirq_write(sirq_dbg, str, sizeof(str));
+ // }
+ // if (count == 9) {
+ // sirq_printf("background\r\n");
+ // for (int i = 0; i < 10; i++) {
+ // sirq_printf(" worst[%d] = 0.%09u\r\n",
+ // i, worst[i]);
+ // worst[i] = 0;
+ // }
+ // }
+ // due += NSEC_PER_SEC;
+ // count = (count + 1) % 10;
+ // }
+ //}
+