summaryrefslogtreecommitdiff
path: root/lib/d
diff options
context:
space:
mode:
authorNobuaki Sukegawa <nsuke@apache.org>2016-03-09 20:09:10 +0900
committerNobuaki Sukegawa <nsuke@apache.org>2016-03-13 09:00:30 +0900
commit74f583cf60d7cc7e3cba8b11edc73869a18e4353 (patch)
tree6125a614b737921d54717e76ad9205948cb6c965 /lib/d
parent26e1b9471945386113db1ce180533b5775f2b9cc (diff)
downloadthrift-74f583cf60d7cc7e3cba8b11edc73869a18e4353.tar.gz
THRIFT-3724 Fix incorrect timeval conversion in libevent.d
This closes #936
Diffstat (limited to 'lib/d')
-rw-r--r--lib/d/src/thrift/async/libevent.d4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/d/src/thrift/async/libevent.d b/lib/d/src/thrift/async/libevent.d
index 2cf0d3ca5..812e4a765 100644
--- a/lib/d/src/thrift/async/libevent.d
+++ b/lib/d/src/thrift/async/libevent.d
@@ -442,8 +442,8 @@ private:
private {
timeval toTimeval(const(Duration) dur) {
- timeval tv = {tv_sec: cast(int)dur.total!"seconds"(),
- tv_usec: dur.total!"usecs"};
+ timeval tv;
+ dur.split!("seconds", "usecs")(tv.tv_sec, tv.tv_usec);
return tv;
}