Scheduler: Remove obsolete 'Scheduler' class
[senf.git] / PPI / SocketSource.test.cc
index e2ec503..a1f3711 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
-// Copyright (C) 2007 
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -47,7 +47,7 @@ namespace debug = module::debug;
 
 namespace {
     void timeout() {
-        senf::Scheduler::instance().terminate();
+        senf::scheduler::terminate();
     }
 }
 
@@ -64,8 +64,9 @@ BOOST_AUTO_UNIT_TEST(socketSource)
 
     senf::UDPv4ClientSocketHandle outputSocket;
     outputSocket.writeto(senf::INet4SocketAddress("localhost:44344"),data);
-    senf::Scheduler::instance().timeout(
-        senf::ClockService::now() + senf::ClockService::milliseconds(100), &timeout);
+    senf::scheduler::TimerEvent timer (
+        "socketSource test timer", &timeout,
+        senf::ClockService::now() + senf::ClockService::milliseconds(100));
     senf::ppi::run();
 
     BOOST_REQUIRE( ! sink.empty() );