diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-14 08:50:46 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-14 08:50:46 +0000 |
commit | db55a4ea1ec4976aced4bae0b4bb5b27684b1e71 (patch) | |
tree | 8af3b98be114b1a4ef3afcfa1a9a4a34e28e03bc /fnet/src/examples/timeout | |
parent | 94aa4e270540c078d20e75effa3d482fb2f034a8 (diff) |
Reduce timeouts.
Diffstat (limited to 'fnet/src/examples/timeout')
-rw-r--r-- | fnet/src/examples/timeout/timeout.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fnet/src/examples/timeout/timeout.cpp b/fnet/src/examples/timeout/timeout.cpp index 9f363ccd864..b2f6c3a8e3c 100644 --- a/fnet/src/examples/timeout/timeout.cpp +++ b/fnet/src/examples/timeout/timeout.cpp @@ -60,16 +60,16 @@ MyApp::Main() transport.Start(&pool); // stable-state operation - std::this_thread::sleep_for(500ms); + std::this_thread::sleep_for(100ms); FNET_Packet *packet; FNET_Context context; - fprintf(stderr, "scheduling timeout in 2 seconds...\n"); + fprintf(stderr, "scheduling timeout in 1 seconds...\n"); t = clock::now(); - timeout.Schedule(2.0); // timeout in 2 seconds + timeout.Schedule(1.0); // timeout in 1 seconds - std::this_thread::sleep_for(1s); + std::this_thread::sleep_for(100ms); timeout.Unschedule(); // cancel timeout ms = (clock::now() - t); @@ -78,9 +78,9 @@ MyApp::Main() fprintf(stderr, "timeout canceled; no timeout packet delivered\n"); fprintf(stderr, "time since timeout was scheduled: %f ms\n", ms.count()); - fprintf(stderr, "scheduling timeout in 2 seconds...\n"); + fprintf(stderr, "scheduling timeout in 1 seconds...\n"); t = clock::now(); - timeout.Schedule(2.0); // timeout in 2 seconds + timeout.Schedule(1.0); // timeout in 1 seconds packet = queue.DequeuePacket(&context); // wait for timeout ms = (clock::now() - t); |