From 30e053db2a5bf4becc57e07aa02c9b1ab76d9768 Mon Sep 17 00:00:00 2001 From: Hiroki Noda Date: Sun, 3 Dec 2017 19:41:41 +0900 Subject: [PATCH] Add sendWithReplyBlocking overload taking a Duration. --- source/ddbus/thin.d | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/ddbus/thin.d b/source/ddbus/thin.d index b3cf39a..1425b18 100644 --- a/source/ddbus/thin.d +++ b/source/ddbus/thin.d @@ -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 {