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

Function alarm_handler

src/platforms/posix/run_unit_test.hpp:47–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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