Merge pull request #30 from kubo39/duration
Add sendWithReplyBlocking overload taking a Duration.
This commit is contained in:
commit
10b8a22b95
|
@ -1,6 +1,8 @@
|
||||||
/// Thin OO wrapper around DBus types
|
/// Thin OO wrapper around DBus types
|
||||||
module ddbus.thin;
|
module ddbus.thin;
|
||||||
|
|
||||||
|
import core.time : Duration;
|
||||||
|
|
||||||
import ddbus.c_lib;
|
import ddbus.c_lib;
|
||||||
import ddbus.conv;
|
import ddbus.conv;
|
||||||
import ddbus.exception : TypeMismatchException;
|
import ddbus.exception : TypeMismatchException;
|
||||||
|
@ -736,6 +738,10 @@ struct Connection {
|
||||||
});
|
});
|
||||||
return Message(reply);
|
return Message(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Message sendWithReplyBlocking(Message msg, Duration timeout) {
|
||||||
|
return sendWithReplyBlocking(msg, timeout.total!"msecs"().to!int);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unittest {
|
unittest {
|
||||||
|
|
Loading…
Reference in a new issue