mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
Subtracting with a uint64_t operand yields a uint64_t result, for which the absolute value is not terribly interesting. Cast the operand to int64_t. Use llabs instead of abs as abs takes an int parameter and not an int64_t. This appears to work even with the minimal C library. Signed-off-by: Keith Packard <keithp@keithp.com>
$ make run [QEMU] CPU: qemu32 Running test suite test_timer_api tc_start() - test_timer_duration_period =================================================================== PASS - test_timer_duration_period. tc_start() - test_timer_period_0 =================================================================== PASS - test_timer_period_0. tc_start() - test_timer_expirefn_null =================================================================== PASS - test_timer_expirefn_null. tc_start() - test_timer_status_get =================================================================== PASS - test_timer_status_get. tc_start() - test_timer_status_get_anytime =================================================================== PASS - test_timer_status_get_anytime. tc_start() - test_timer_status_sync =================================================================== PASS - test_timer_status_sync. tc_start() - test_timer_k_define =================================================================== PASS - test_timer_k_define. =================================================================== PROJECT EXECUTION SUCCESSFUL