summaryrefslogtreecommitdiff
path: root/lib/d
diff options
context:
space:
mode:
authorJames Lacey <jamlacey@gmail.com>2021-03-23 14:45:51 -0700
committerJens Geyer <jensg@apache.org>2021-03-24 22:20:41 +0100
commit149c8d09b11328c0cd6da79fd9267520b800fefc (patch)
tree8ecad56d95a6058ca81d819a80edcad1be9cc64d /lib/d
parentb71f11e251a711604cea8caad7d493ea57fe8a8f (diff)
downloadthrift-149c8d09b11328c0cd6da79fd9267520b800fefc.tar.gz
THRIFT-5376 Fix deprecation warnings in D library
Client: d Patch: James Lacey This closes #2355
Diffstat (limited to 'lib/d')
-rw-r--r--lib/d/test/thrift_test_client.d10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/d/test/thrift_test_client.d b/lib/d/test/thrift_test_client.d
index c9911e28b..e7b644c1d 100644
--- a/lib/d/test/thrift_test_client.d
+++ b/lib/d/test/thrift_test_client.d
@@ -19,7 +19,7 @@
module thrift_test_client;
import std.conv;
-import std.datetime;
+import std.datetime.stopwatch;
import std.exception : enforce;
import std.getopt;
import std.stdio;
@@ -348,14 +348,14 @@ void main(string[] args) {
auto onewayWatch = StopWatch(AutoStart.yes);
client.testOneway(3);
onewayWatch.stop();
- if (onewayWatch.peek().msecs > 200) {
+ if (onewayWatch.peek.total!"msecs" > 200) {
if (trace) {
- writefln(" FAILURE - took %s ms", onewayWatch.peek().usecs / 1000.0);
+ writefln(" FAILURE - took %s ms", onewayWatch.peek.total!"usecs" / 1000.0);
}
throw new Exception("testOneway failed.");
} else {
if (trace) {
- writefln(" success - took %s ms", onewayWatch.peek().usecs / 1000.0);
+ writefln(" success - took %s ms", onewayWatch.peek.total!"usecs" / 1000.0);
}
}
@@ -370,7 +370,7 @@ void main(string[] args) {
// Time metering.
sw.stop();
- immutable tot = sw.peek().usecs;
+ immutable tot = sw.peek.total!"usecs" ;
if (trace) writefln("Total time: %s us\n", tot);
time_tot += tot;