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
Bartek Szatkowski 2016-08-23 15:32:12 +01:00
parent 7203be9e6f
commit 6fef43013f
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ public:
}
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