Fix overflow issue causing common tickers test to intermittently fail (#57)

* Fix overflow issue causing common tickers test to intermittently fail (#44)

* Tabs -> spaces
pull/15339/head
Jamie Smith 2022-09-25 09:09:17 -07:00 committed by GitHub
parent 1d44be27c6
commit 60a3a4e524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -221,9 +221,9 @@ void ticker_interrupt_test(void)
uint8_t run_count = 0;
const ticker_info_t *p_ticker_info = intf->get_info();
overflow_protect();
for (uint32_t i = 0; i < (sizeof(ticker_timeout) / sizeof(uint32_t)); i++) {
// If needed, delay until we can run the test without overflowing the ticker.
overflow_protect();
/* Skip timeout if less than max allowed execution time of set_interrupt() - 20 us */
if (TICKS_TO_US(ticker_timeout[i], p_ticker_info->frequency) < (MAX_FUNC_EXEC_TIME_US + DELTA_FUNC_EXEC_TIME_US)) {