Skip to content
Snippets Groups Projects
Commit 01225ca9 authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

gnrc_nettest: use xtimer instead of vtimer

parent c2ae6a86
No related branches found
No related tags found
No related merge requests found
...@@ -255,7 +255,7 @@ ifneq (,$(filter gnrc_nettest,$(USEMODULE))) ...@@ -255,7 +255,7 @@ ifneq (,$(filter gnrc_nettest,$(USEMODULE)))
USEMODULE += gnrc_netreg USEMODULE += gnrc_netreg
USEMODULE += gnrc_netif USEMODULE += gnrc_netif
USEMODULE += gnrc_pktbuf USEMODULE += gnrc_pktbuf
USEMODULE += vtimer USEMODULE += xtimer
endif endif
ifneq (,$(filter gnrc_pktdump,$(USEMODULE))) ifneq (,$(filter gnrc_pktdump,$(USEMODULE)))
......
...@@ -22,9 +22,8 @@ ...@@ -22,9 +22,8 @@
#include "net/netopt.h" #include "net/netopt.h"
#include "net/gnrc/netreg.h" #include "net/gnrc/netreg.h"
#include "net/gnrc/pktbuf.h" #include "net/gnrc/pktbuf.h"
#include "timex.h"
#include "thread.h" #include "thread.h"
#include "vtimer.h" #include "xtimer.h"
#include "net/gnrc/nettest.h" #include "net/gnrc/nettest.h"
...@@ -55,14 +54,12 @@ static gnrc_nettest_res_t _pkt_test(uint16_t cmd_type, kernel_pid_t pid, ...@@ -55,14 +54,12 @@ static gnrc_nettest_res_t _pkt_test(uint16_t cmd_type, kernel_pid_t pid,
const gnrc_pktsnip_t **exp_out) const gnrc_pktsnip_t **exp_out)
{ {
msg_t msg; msg_t msg;
timex_t t = { 0, GNRC_NETTEST_TIMEOUT };
gnrc_nettest_res_t res = GNRC_NETTEST_SUCCESS; gnrc_nettest_res_t res = GNRC_NETTEST_SUCCESS;
msg.type = cmd_type; msg.type = cmd_type;
msg.content.ptr = (char *)in; msg.content.ptr = (char *)in;
msg_send(&msg, pid); msg_send(&msg, pid);
timex_normalize(&t);
if (exp_pkts == 0) { if (exp_pkts == 0) {
thread_yield(); thread_yield();
...@@ -72,7 +69,7 @@ static gnrc_nettest_res_t _pkt_test(uint16_t cmd_type, kernel_pid_t pid, ...@@ -72,7 +69,7 @@ static gnrc_nettest_res_t _pkt_test(uint16_t cmd_type, kernel_pid_t pid,
gnrc_pktsnip_t *out; gnrc_pktsnip_t *out;
const gnrc_pktsnip_t *exp = exp_out[i]; const gnrc_pktsnip_t *exp = exp_out[i];
if (vtimer_msg_receive_timeout(&msg, t) < 0) { if (xtimer_msg_receive_timeout(&msg, GNRC_NETTEST_TIMEOUT) < 0) {
return GNRC_NETTEST_TIMED_OUT; return GNRC_NETTEST_TIMED_OUT;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment