Skip to content

Commit

Permalink
fix: use same default value as rust example
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Oct 25, 2023
1 parent 57c4845 commit 651294c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/unix/c11/z_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ int main(int argc, char** argv) {
if (args.help_requested) {
printf(
"\
-n (optional, int, default=4): the number of pings to be attempted\n\
-n (optional, int, default=100): the number of pings to be attempted\n\
-s (optional, int, default=8): the size of the payload embedded in the ping and repeated by the pong\n\
-w (optional, int, default=0): the warmup time in ms during which pings will be emitted but not measured\n\
-w (optional, int, default=1000): the warmup time in ms during which pings will be emitted but not measured\n\
-c (optional, string): the path to a configuration file for the session. If this option isn't passed, the default configuration will be used.\n\
");
return 1;
Expand Down Expand Up @@ -150,12 +150,12 @@ struct args_t parse_args(int argc, char** argv) {
size = atoi(arg);
}
arg = getopt(argc, argv, 'n');
unsigned int number_of_pings = 4;
unsigned int number_of_pings = 100;
if (arg) {
number_of_pings = atoi(arg);
}
arg = getopt(argc, argv, 'w');
unsigned int warmup_ms = 0;
unsigned int warmup_ms = 1000;
if (arg) {
warmup_ms = atoi(arg);
}
Expand Down

0 comments on commit 651294c

Please sign in to comment.