diff options
Diffstat (limited to 'fnet/src/examples/timeout/timeout.cpp')
-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); |