diff --git a/tests/0-dirwatcher.d b/tests/0-dirwatcher.d index 482a9d4..cc921b0 100644 --- a/tests/0-dirwatcher.d +++ b/tests/0-dirwatcher.d @@ -7,7 +7,7 @@ module test; import eventcore.core; import std.stdio : File, writefln; import std.file : exists, remove; -import core.time : msecs; +import core.time : Duration, msecs; bool s_done; int s_cnt = 0; @@ -45,12 +45,12 @@ void main() auto fil = File(testFilename, "wt"); auto tm = eventDriver.timers.create(); - eventDriver.timers.set(tm, 100.msecs); + eventDriver.timers.set(tm, 100.msecs, 0.msecs); eventDriver.timers.wait(tm, (tm) { scope (failure) assert(false); fil.write("test"); fil.close(); - eventDriver.timers.set(tm, 100.msecs); + eventDriver.timers.set(tm, 100.msecs, 0.msecs); eventDriver.timers.wait(tm, (tm) { scope (failure) assert(false); remove(testFilename); @@ -58,7 +58,7 @@ void main() }); ExitReason er; - do er = eventDriver.core.processEvents(); + do er = eventDriver.core.processEvents(Duration.max); while (er == ExitReason.idle); //assert(er == ExitReason.outOfWaiters); // FIXME: see above assert(s_done); diff --git a/tests/0-dns.d b/tests/0-dns.d index b05d05c..7153aa3 100644 --- a/tests/0-dns.d +++ b/tests/0-dns.d @@ -6,6 +6,7 @@ module test; import eventcore.core; import std.stdio : writefln; +import core.time : Duration; bool s_done; @@ -23,7 +24,7 @@ void main() }); ExitReason er; - do er = eventDriver.core.processEvents(); + do er = eventDriver.core.processEvents(Duration.max); while (er == ExitReason.idle); //assert(er == ExitReason.outOfWaiters); // FIXME: see above assert(s_done); diff --git a/tests/0-signal.d b/tests/0-signal.d index 79379ae..feb04c2 100644 --- a/tests/0-signal.d +++ b/tests/0-signal.d @@ -8,7 +8,7 @@ import eventcore.core; import std.stdio : writefln; import core.stdc.signal; import core.sys.posix.signal : SIGRTMIN; -import core.time : msecs; +import core.time : Duration, msecs; bool s_done; @@ -23,13 +23,13 @@ void main() }); auto tm = eventDriver.timers.create(); - eventDriver.timers.set(tm, 500.msecs); + eventDriver.timers.set(tm, 500.msecs, 0.msecs); eventDriver.timers.wait(tm, (tm) { () @trusted { raise(SIGRTMIN+1); } (); }); ExitReason er; - do er = eventDriver.core.processEvents(); + do er = eventDriver.core.processEvents(Duration.max); while (er == ExitReason.idle); //assert(er == ExitReason.outOfWaiters); // FIXME: see above assert(s_done); diff --git a/tests/0-udp.d b/tests/0-udp.d index be05b29..a42f760 100644 --- a/tests/0-udp.d +++ b/tests/0-udp.d @@ -7,6 +7,7 @@ module test; import eventcore.core; import eventcore.socket; import std.socket : InternetAddress; +import core.time : Duration; DatagramSocket s_baseSocket; DatagramSocket s_freeSocket; @@ -63,7 +64,7 @@ void main() })(pack1, IOMode.immediate); ExitReason er; - do er = eventDriver.core.processEvents(); + do er = eventDriver.core.processEvents(Duration.max); while (er == ExitReason.idle); //assert(er == ExitReason.outOfWaiters); // FIXME: see above assert(s_done); diff --git a/tests/0-usds.d b/tests/0-usds.d index 455a7b6..0646471 100644 --- a/tests/0-usds.d +++ b/tests/0-usds.d @@ -18,6 +18,7 @@ import eventcore.core; import eventcore.socket; import std.file : exists, remove; import std.socket : UnixAddress; +import core.time : Duration; ubyte[256] s_rbuf; bool s_done; @@ -75,7 +76,7 @@ void testDgram() ExitReason er; - do er = eventDriver.core.processEvents(); + do er = eventDriver.core.processEvents(Duration.max); while (er == ExitReason.idle); //assert(er == ExitReason.outOfWaiters); // FIXME: see above assert(s_done); @@ -130,7 +131,7 @@ void testStream() })(baddr); ExitReason er; - do er = eventDriver.core.processEvents(); + do er = eventDriver.core.processEvents(Duration.max); while (er == ExitReason.idle); //assert(er == ExitReason.outOfWaiters); // FIXME: see above assert(s_done);