Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add ps #1

Merged
merged 1 commit into from
May 5, 2016
Merged
Show file tree
Hide file tree
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
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