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