tests: timer_behavior: use fabs() instead of abs()
abs() takes integer as argument but time_diff_us is of double. So use fabs() instead. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
cc5adf2e92
commit
38825c0ac5
1 changed files with 1 additions and 1 deletions
|
@ -333,7 +333,7 @@ static void do_test_using(void (*sample_collection_fn)(void), const char *mechan
|
|||
"Standard deviation (in microseconds) outside expected bound");
|
||||
|
||||
/* Validate the timer drift (accuracy over time) is within a configurable bound */
|
||||
zassert_true(abs(time_diff_us) < CONFIG_TIMER_TEST_MAX_DRIFT,
|
||||
zassert_true(fabs(time_diff_us) < CONFIG_TIMER_TEST_MAX_DRIFT,
|
||||
"Drift (in microseconds) outside expected bound");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue