Skip to content

Commit

Permalink
Merge pull request #1 from cgundogan/pr/kYc0o/ps
Browse files Browse the repository at this point in the history
add ps
  • Loading branch information
kYc0o committed May 5, 2016
2 parents 03ff18e + c0049e9 commit abdf550
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/gnrc_networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ USEMODULE += gnrc_icmpv6_echo
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
USEMODULE += schedstatistics

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
2 changes: 2 additions & 0 deletions examples/gnrc_networking/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "net/gnrc/udp.h"
#include "timex.h"
#include "xtimer.h"
#include "ps.h"

#define MAIN_QUEUE_SIZE (8)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
Expand Down Expand Up @@ -93,6 +94,7 @@ static void send(char *addr_str, char *port_str, char *data, unsigned int num,
addr_str, port);
xtimer_usleep(delay);
}
ps();
}

static void start_server(char *port_str)
Expand Down
1 change: 1 addition & 0 deletions examples/gnrc_networking_sender/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ USEMODULE += gnrc_icmpv6_echo
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
USEMODULE += schedstatistics

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
2 changes: 2 additions & 0 deletions examples/gnrc_networking_sender/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "net/gnrc/udp.h"
#include "timex.h"
#include "xtimer.h"
#include "ps.h"

#define MAIN_QUEUE_SIZE (8)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
Expand Down Expand Up @@ -102,6 +103,7 @@ static void send(char *addr_str, char *port_str, char *data, unsigned int num,
addr_str, port);
xtimer_usleep(delay);
}
ps();

printf("total active time: %d\n", (unsigned int)total);
}
Expand Down

0 comments on commit abdf550

Please sign in to comment.