Skip to content

Commit 42bf813

Browse files
committed
Removed float symbols from Ticker module
Cast rvalue to `int` type when forwarding the call to get rid of float operation.
1 parent d847f9f commit 42bf813

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/Ticker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {
9090
#endif
9191
void attach(F &&func, float t)
9292
{
93-
attach_us(std::forward<F>(func), t * 1000000.0f);
93+
attach_us(std::forward<F>(func), (int)(t * 1000000));
9494
}
9595

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

0 commit comments

Comments
 (0)