Merge pull request #30 from kubo39/duration

Add sendWithReplyBlocking overload taking a Duration.
This commit is contained in:
Jan Jurzitza 2017-12-03 22:07:23 +01:00 committed by GitHub
commit 10b8a22b95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {