hrt: remove hrt_elapsed_time_atomic

There's no protection on posix
This commit is contained in:
Beat Küng
2021-09-23 09:23:08 +02:00
parent 6f902e54f9
commit e73172b537
9 changed files with 3 additions and 87 deletions
@@ -144,7 +144,6 @@ 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_atomic()", u_64_out = hrt_elapsed_time_atomic(&u_64), 1000);
return true;
}
+2 -2
View File
@@ -71,13 +71,13 @@ int HRTTest::main()
hrt_abstime t = hrt_absolute_time();
px4_usleep(1000000);
hrt_abstime elt = hrt_elapsed_time_atomic(&t);
hrt_abstime elt = hrt_elapsed_time(&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_atomic(&t);
elt = hrt_elapsed_time(&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);