diff --git a/src/systemcmds/tests/hrt_test/hrt_test.cpp b/src/systemcmds/tests/hrt_test/hrt_test.cpp index 2b087bcc68c0..38068d95f0be 100644 --- a/src/systemcmds/tests/hrt_test/hrt_test.cpp +++ b/src/systemcmds/tests/hrt_test/hrt_test.cpp @@ -71,13 +71,13 @@ int HRTTest::main() hrt_abstime t = hrt_absolute_time(); px4_usleep(1000000); - hrt_abstime elt = hrt_elapsed_time(&t); + hrt_abstime elt = hrt_elapsed_time_atomic(&t); PX4_INFO("Elapsed time %llu in 1 sec (usleep)\n", (unsigned long long)elt); PX4_INFO("Start time %llu\n", (unsigned long long)t); t = hrt_absolute_time(); px4_sleep(1); - elt = hrt_elapsed_time(&t); + elt = hrt_elapsed_time_atomic(&t); PX4_INFO("Elapsed time %llu in 1 sec (sleep)\n", (unsigned long long)elt); PX4_INFO("Start time %llu\n", (unsigned long long)t); diff --git a/src/systemcmds/tests/test_microbench_hrt.cpp b/src/systemcmds/tests/test_microbench_hrt.cpp index 8e3410f47360..4eefe1f63ae4 100644 --- a/src/systemcmds/tests/test_microbench_hrt.cpp +++ b/src/systemcmds/tests/test_microbench_hrt.cpp @@ -137,7 +137,7 @@ ut_declare_test_c(test_microbench_hrt, MicroBenchHRT) bool MicroBenchHRT::time_px4_hrt() { PERF("hrt_absolute_time()", u_64_out = hrt_absolute_time(), 1000); - PERF("hrt_elapsed_time()", u_64_out = hrt_elapsed_time(&u_64), 1000); + PERF("hrt_elapsed_time()", u_64_out = hrt_elapsed_time_atomic(&u_64), 1000); return true; }