diff options
Diffstat (limited to 'tests/polltimeo.cpp')
-rw-r--r-- | tests/polltimeo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/polltimeo.cpp b/tests/polltimeo.cpp index 3f7a233..087d125 100644 --- a/tests/polltimeo.cpp +++ b/tests/polltimeo.cpp @@ -26,12 +26,12 @@ extern "C" { // Worker thread connects after delay of 1 second. Then it waits // for 1 more second, so that async connect has time to succeed. - xs_sleep (1); + sleep (1); void *sc = xs_socket (ctx_, XS_PUSH); assert (sc); int rc = xs_connect (sc, "inproc://timeout_test"); assert (rc == 0); - xs_sleep (1); + sleep (1); rc = xs_close (sc); assert (rc == 0); } @@ -61,14 +61,14 @@ int XS_TEST_MAIN () assert (elapsed > 440000 && elapsed < 550000); // Check whether connection during the wait doesn't distort the timeout. - void *thread = xs_thread_create (polltimeo_worker, ctx); + void *thread = thread_create (polltimeo_worker, ctx); assert (thread); watch = xs_stopwatch_start (); rc = xs_poll (&pi, 1, 2000); assert (rc == 0); elapsed = xs_stopwatch_stop (watch); assert (elapsed > 1900000 && elapsed < 2100000); - xs_thread_join (thread); + thread_join (thread); // Clean-up. rc = xs_close (sb); |