mirror of https://github.com/ARMmbed/mbed-os.git
Ticker: invoke _function only if attached
parent
deb1febb8b
commit
78718910d3
|
|
@ -43,7 +43,9 @@ void Ticker::setup(us_timestamp_t t) {
|
||||||
|
|
||||||
void Ticker::handler() {
|
void Ticker::handler() {
|
||||||
insert_absolute(event.timestamp + _delay);
|
insert_absolute(event.timestamp + _delay);
|
||||||
|
if (_function) {
|
||||||
_function();
|
_function();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue