diff --git a/src/threadedtimer.h b/src/threadedtimer.h index 7b34c8b..90a9bbe 100644 --- a/src/threadedtimer.h +++ b/src/threadedtimer.h @@ -3,12 +3,12 @@ #include -#ifndef MBED_THREAD_H - static_assert(false, "Threaded Timer is only supported on mbed based Arduinos"); +#ifndef ARDUINO_ARCH_MBED +# error "ThreadedTimer only runs on Mbed OS based boards" #else using namespace rtos; using namespace events; -#endif // MBED_THREAD_H +#endif // ARDUINO_ARCH_MBED #define MAX_TIMERS 12 @@ -25,9 +25,11 @@ class ThreadedTimer int time_left(int id); private: +#ifdef MBED_THREAD_H Thread _event_thread; EventQueue *_timer_queue; - +#endif // MBED_THREAD_H }; + #endif // THREADED_TIMER \ No newline at end of file