mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
lib/Ticker: add bool active() (#2722)
* lib/Ticker: add bool active() Makes it easier to self detach, and check if a timer is still operating. Signed-off-by: Karl Palsson <karlp@tweak.net.au> * Code cleanup Ticker.cpp
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#define TICKER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
extern "C" {
|
||||
@ -93,6 +94,7 @@ public:
|
||||
}
|
||||
|
||||
void detach();
|
||||
bool active();
|
||||
|
||||
protected:
|
||||
void _attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t callback, uint32_t arg);
|
||||
|
Reference in New Issue
Block a user