THRIFT-5376 Fix deprecation warnings in D library
Client: d
Patch: James Lacey

This closes #2355
diff --git a/lib/d/test/thrift_test_client.d b/lib/d/test/thrift_test_client.d
index c9911e2..e7b644c 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 @@
       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 @@
     // 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;