From 8e6f94ffffcc992c24393be15d8f984a5c5eef6f Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Fri, 18 Jan 2013 09:15:34 -0800 Subject: Adding a sleep() paradigm to tasks. --- tests/test-Http.cc | 4 +--- tests/test-Sockets.cc | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/test-Http.cc b/tests/test-Http.cc index 941d6a8..cd183ce 100644 --- a/tests/test-Http.cc +++ b/tests/test-Http.cc @@ -130,9 +130,7 @@ void MainTask::Do() { s->setLocal("localhost"); s->start(); - Events::Timeout timeout(1); - waitFor(&timeout); - yield(); + sleep(1); Events::TaskEvent stopperEvent; Task * stopper = TaskMan::registerTask(new Stopper, &stopperEvent); diff --git a/tests/test-Sockets.cc b/tests/test-Sockets.cc index 4ef0a78..0bcfc2a 100644 --- a/tests/test-Sockets.cc +++ b/tests/test-Sockets.cc @@ -39,9 +39,7 @@ class Client : public Task { public: virtual const char * getName() const { return "Test client"; } virtual void Do() { - Events::Timeout evt(0.1); - waitFor(&evt); - yield(); + sleep(0.1); char x, y; IO s(new Socket()); -- cgit v1.2.3