mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
hrt test decrease time
This commit is contained in:
committed by
Nuno Marques
parent
af9690cf08
commit
4e5b223a08
@@ -186,12 +186,12 @@ int test_hrt(int argc, char *argv[])
|
||||
int i;
|
||||
struct timeval tv1, tv2;
|
||||
|
||||
printf("start-time (hrt, sec/usec), end-time (hrt, sec/usec), microseconds per half second\n");
|
||||
printf("start-time (hrt, sec/usec), end-time (hrt, sec/usec), microseconds per 1/10 second\n");
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
prev = hrt_absolute_time();
|
||||
gettimeofday(&tv1, NULL);
|
||||
usleep(500000);
|
||||
usleep(100000);
|
||||
now = hrt_absolute_time();
|
||||
gettimeofday(&tv2, NULL);
|
||||
printf("%lu (%lu/%lu), %lu (%lu/%lu), %lu\n",
|
||||
@@ -205,7 +205,7 @@ int test_hrt(int argc, char *argv[])
|
||||
|
||||
printf("one-second ticks\n");
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
hrt_call_after(&call, 1000000, NULL, NULL);
|
||||
|
||||
while (!hrt_called(&call)) {
|
||||
|
||||
Reference in New Issue
Block a user