mirror of https://github.com/ARMmbed/mbed-os.git
Ticker: Move ticker initialisation to object creation time
Having it in the attach call introduces extra latency and can break short delays, for the first usage.pull/2476/head
parent
7203be9e6f
commit
6fef43013f
|
@ -63,6 +63,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Ticker(const ticker_data_t *data) : TimerEvent(data) {
|
Ticker(const ticker_data_t *data) : TimerEvent(data) {
|
||||||
|
data->interface->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Attach a function to be called by the Ticker, specifiying the interval in seconds
|
/** Attach a function to be called by the Ticker, specifiying the interval in seconds
|
||||||
|
|
Loading…
Reference in New Issue