Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

shell/gnrc_icmpv6_echo: acquire ZTIMER_USEC clock for time measurement #19055

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sys/shell/cmds/gnrc_icmpv6_echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ static int _gnrc_icmpv6_ping(int argc, char **argv)
};
int res;

ztimer_acquire(ZTIMER_USEC);

if ((res = _configure(argc, argv, &data)) != 0) {
return res;
goto ret;
}
gnrc_netreg_register(GNRC_NETTYPE_ICMPV6, &data.netreg);
_pinger(&data);
Expand Down Expand Up @@ -143,6 +145,8 @@ static int _gnrc_icmpv6_ping(int argc, char **argv)
msg_send(&msg, thread_getpid());
}
}
ret:
ztimer_release(ZTIMER_USEC);
return res;
}

Expand Down