mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-12 03:23:34 +08:00
systemcmds/tests: microbench hrt run both regular and atomic hrt_elapsed_time
This commit is contained in:
@@ -111,8 +111,8 @@ private:
|
||||
#endif
|
||||
}
|
||||
|
||||
volatile uint64_t u_64;
|
||||
volatile uint64_t u_64_out;
|
||||
uint64_t u_64;
|
||||
uint64_t u_64_out;
|
||||
};
|
||||
|
||||
bool MicroBenchHRT::run_tests()
|
||||
@@ -143,7 +143,8 @@ 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_atomic(&u_64), 1000);
|
||||
PERF("hrt_elapsed_time()", u_64_out = hrt_elapsed_time(&u_64), 1000);
|
||||
PERF("hrt_elapsed_time_atomic()", u_64_out = hrt_elapsed_time_atomic(&u_64), 1000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user