Skip to content

Commit 9cc816d

Browse files
committed
Un-templatise interval and forward the reference
Also fix code style to please style checker
1 parent e06c91c commit 9cc816d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/Ticker.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {
8282
* @param func pointer to the function to be called
8383
* @param t the time between calls in seconds
8484
*/
85-
template <typename F, typename T>
86-
MBED_FORCEINLINE void attach(F&& func, T&& t)
85+
template <typename F>
86+
MBED_FORCEINLINE void attach(F &&func, float t)
8787
{
88-
attach_us(func, t * 1000000.0f);
88+
attach_us(std::forward<F>(func), t * 1000000.0f);
8989
}
9090

9191
/** Attach a member function to be called by the Ticker, specifying the interval in seconds

0 commit comments

Comments
 (0)