MCPcopy Create free account
hub / github.com/FastLED/FastLED / alarm_handler

Function alarm_handler

src/platforms/apple/run_unit_test.hpp:48–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46static double g_timeout_seconds = 20.0;
47
48static void alarm_handler(int) FL_NOEXCEPT {
49 if (!g_active) {
50 return;
51 }
52
53 fprintf(stderr, "\n");
54 fprintf(stderr, "================================================================================\n");
55 fprintf(stderr, "RUNNER WATCHDOG TIMEOUT\n");
56 fprintf(stderr, "================================================================================\n");
57 fprintf(stderr, "Test exceeded runner timeout of %.1f seconds\n", g_timeout_seconds);
58 fprintf(stderr, "Dumping stack trace...\n");
59 fprintf(stderr, "================================================================================\n");
60 fprintf(stderr, "\n");
61
62 runner_print_stacktrace();
63
64 fprintf(stderr, "\n");
65 fprintf(stderr, "================================================================================\n");
66 fprintf(stderr, "END RUNNER WATCHDOG\n");
67 fprintf(stderr, "Exiting with code 1\n");
68 fprintf(stderr, "================================================================================\n");
69 fprintf(stderr, "\n");
70
71 _exit(1);
72}
73
74static void setup(double timeout_seconds = 20.0) FL_NOEXCEPT {
75 const char* disable_env = getenv("FASTLED_DISABLE_TIMEOUT_WATCHDOG");

Callers

nothing calls this directly

Calls 1

runner_print_stacktraceFunction · 0.85

Tested by

no test coverage detected