1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 01:53:51 +01:00

shell/sc_gnrc_udp: set proper timeout based on which timer is used

This commit is contained in:
Benjamin Valentin 2022-02-14 17:52:55 +01:00
parent 78e4f6b557
commit e22698f9cd

View File

@ -158,7 +158,7 @@ int _gnrc_udp_cmd(int argc, char **argv)
if (strcmp(argv[1], "send") == 0) {
uint32_t num = 1;
uint32_t delay = 1000000;
uint32_t delay;
if (argc < 5) {
#if IS_USED(MODULE_ZTIMER_MSEC)
printf("usage: %s send "
@ -174,6 +174,8 @@ int _gnrc_udp_cmd(int argc, char **argv)
}
if (argc > 6) {
delay = atoi(argv[6]);
} else {
delay = IS_USED(MODULE_ZTIMER_MSEC) ? 1000 : 1000000;
}
_send(argv[2], argv[3], argv[4], num, delay);
}