mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
systemcmds/tests: microbench hrt run both regular and atomic hrt_elapsed_time
This commit is contained in:
parent
6bdcca6a85
commit
aec1b9243a
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user