Skip to content

Commit 2a7e509

Browse files
full-stack-exme-no-dev
authored andcommitted
Fix long Ticker period conversion: cast ms to uint64_t when calculating us (#3175)
* Fix long Ticker period conversion * Simplify long Ticker period conversion fix by using 1000ULL
1 parent 1b8c7e3 commit 2a7e509

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/Ticker/src/Ticker.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ void Ticker::_attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t
4343
}
4444
esp_timer_create(&_timerConfig, &_timer);
4545
if (repeat) {
46-
esp_timer_start_periodic(_timer, milliseconds * 1000);
46+
esp_timer_start_periodic(_timer, milliseconds * 1000ULL);
4747
} else {
48-
esp_timer_start_once(_timer, milliseconds * 1000);
48+
esp_timer_start_once(_timer, milliseconds * 1000ULL);
4949
}
5050
}
5151

0 commit comments

Comments
 (0)