| 77 | } |
| 78 | |
| 79 | bool keep_going() FL_NOEXCEPT { |
| 80 | // Check if example requested stop |
| 81 | if (g_should_stop) { |
| 82 | return false; |
| 83 | } |
| 84 | |
| 85 | #ifndef FASTLED_STUB_MAIN_FAST_EXIT |
| 86 | return true; |
| 87 | #else |
| 88 | static int max_iterations = 5; // okay static in header |
| 89 | bool keep_going = max_iterations-- > 0; |
| 90 | return keep_going; |
| 91 | #endif |
| 92 | } |
| 93 | |
| 94 | // Helper function to set delay to zero for fast testing |
| 95 | // Only sets delay to zero when FASTLED_STUB_MAIN_FAST_EXIT is defined |