1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

shell/gnrc_icmpv6_echo: acquire ZTIMER_USEC clock for time measurement

This commit is contained in:
Jue 2022-12-14 17:15:12 +01:00
parent 8459b68654
commit da41955761

View File

@ -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);
@ -143,6 +145,8 @@ finish:
msg_send(&msg, thread_getpid());
}
}
ret:
ztimer_release(ZTIMER_USEC);
return res;
}