Skip to content

Commit 2a56883

Browse files
committed
fix: use same default value as rust example
1 parent 57c4845 commit 2a56883

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

examples/unix/c11/z_ping.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ int main(int argc, char** argv) {
5050
if (args.help_requested) {
5151
printf(
5252
"\
53-
-n (optional, int, default=4): the number of pings to be attempted\n\
53+
-n (optional, int, default=100): the number of pings to be attempted\n\
5454
-s (optional, int, default=8): the size of the payload embedded in the ping and repeated by the pong\n\
55-
-w (optional, int, default=0): the warmup time in ms during which pings will be emitted but not measured\n\
55+
-w (optional, int, default=1000): the warmup time in ms during which pings will be emitted but not measured\n\
5656
-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\
5757
");
5858
return 1;
@@ -150,12 +150,12 @@ struct args_t parse_args(int argc, char** argv) {
150150
size = atoi(arg);
151151
}
152152
arg = getopt(argc, argv, 'n');
153-
unsigned int number_of_pings = 4;
153+
unsigned int number_of_pings = 100;
154154
if (arg) {
155155
number_of_pings = atoi(arg);
156156
}
157157
arg = getopt(argc, argv, 'w');
158-
unsigned int warmup_ms = 0;
158+
unsigned int warmup_ms = 1000;
159159
if (arg) {
160160
warmup_ms = atoi(arg);
161161
}

examples/unix/c99/z_ping.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ int main(int argc, char** argv) {
4949
if (args.help_requested) {
5050
printf(
5151
"\
52-
-n (optional, int, default=4): the number of pings to be attempted\n\
52+
-n (optional, int, default=100): the number of pings to be attempted\n\
5353
-s (optional, int, default=8): the size of the payload embedded in the ping and repeated by the pong\n\
54-
-w (optional, int, default=0): the warmup time in ms during which pings will be emitted but not measured\n\
54+
-w (optional, int, default=1000): the warmup time in ms during which pings will be emitted but not measured\n\
5555
-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\
5656
");
5757
return 1;
@@ -150,12 +150,12 @@ struct args_t parse_args(int argc, char** argv) {
150150
size = atoi(arg);
151151
}
152152
arg = getopt(argc, argv, 'n');
153-
unsigned int number_of_pings = 4;
153+
unsigned int number_of_pings = 100;
154154
if (arg) {
155155
number_of_pings = atoi(arg);
156156
}
157157
arg = getopt(argc, argv, 'w');
158-
unsigned int warmup_ms = 0;
158+
unsigned int warmup_ms = 1000;
159159
if (arg) {
160160
warmup_ms = atoi(arg);
161161
}

examples/windows/z_ping.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ int main(int argc, char** argv) {
4848
if (args.help_requested) {
4949
printf(
5050
"\
51-
-n (optional, int, default=4): the number of pings to be attempted\n\
51+
-n (optional, int, default=100): the number of pings to be attempted\n\
5252
-s (optional, int, default=8): the size of the payload embedded in the ping and repeated by the pong\n\
53-
-w (optional, int, default=0): the warmup time in ms during which pings will be emitted but not measured\n\
53+
-w (optional, int, default=1000): the warmup time in ms during which pings will be emitted but not measured\n\
5454
-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\
5555
");
5656
return 1;
@@ -147,12 +147,12 @@ struct args_t parse_args(int argc, char** argv) {
147147
size = atoi(arg);
148148
}
149149
arg = getopt(argc, argv, 'n');
150-
unsigned int number_of_pings = 4;
150+
unsigned int number_of_pings = 100;
151151
if (arg) {
152152
number_of_pings = atoi(arg);
153153
}
154154
arg = getopt(argc, argv, 'w');
155-
unsigned int warmup_ms = 0;
155+
unsigned int warmup_ms = 1000;
156156
if (arg) {
157157
warmup_ms = atoi(arg);
158158
}

0 commit comments

Comments
 (0)