From 6fef43013ff8d10f593ec84c0ab8f625e55352e0 Mon Sep 17 00:00:00 2001 From: Bartek Szatkowski Date: Tue, 23 Aug 2016 15:32:12 +0100 Subject: [PATCH] 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. --- hal/api/Ticker.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hal/api/Ticker.h b/hal/api/Ticker.h index 496e469fa6..a7848ece4d 100644 --- a/hal/api/Ticker.h +++ b/hal/api/Ticker.h @@ -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