mirror of https://github.com/deavmi/tasky.git
Cleaned up
This commit is contained in:
parent
8539485352
commit
bcdc6121ca
|
@ -123,6 +123,7 @@ public final class Engine : Thread
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
import core.thread : dur;
|
import core.thread : dur;
|
||||||
import std.string : cmp;
|
import std.string : cmp;
|
||||||
|
import std.datetime.stopwatch : StopWatch;
|
||||||
|
|
||||||
/* Job type */
|
/* Job type */
|
||||||
Descriptor jobType = new class Descriptor {
|
Descriptor jobType = new class Descriptor {
|
||||||
|
@ -238,19 +239,12 @@ public final class Engine : Thread
|
||||||
* Await the expected result, but if this does not complete
|
* Await the expected result, but if this does not complete
|
||||||
* within 4 seconds then expect it failed
|
* within 4 seconds then expect it failed
|
||||||
*/
|
*/
|
||||||
import std.datetime.stopwatch : StopWatch;
|
|
||||||
|
|
||||||
StopWatch watch;
|
StopWatch watch;
|
||||||
watch.start();
|
watch.start();
|
||||||
|
|
||||||
while(!results[0] || !results[1] || !results[2] || !results[3])
|
while(!results[0] || !results[1] || !results[2] || !results[3])
|
||||||
{
|
{
|
||||||
/* Check that the array has the correct values */
|
|
||||||
/* FIXME: Add timeout */
|
|
||||||
|
|
||||||
if(watch.peek() > dur!("seconds")(4))
|
if(watch.peek() > dur!("seconds")(4))
|
||||||
{
|
{
|
||||||
writeln(watch.peek());
|
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue