This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 149c8d0  THRIFT-5376 Fix deprecation warnings in D library Client: d 
Patch: James Lacey
149c8d0 is described below

commit 149c8d09b11328c0cd6da79fd9267520b800fefc
Author: James Lacey <[email protected]>
AuthorDate: Tue Mar 23 14:45:51 2021 -0700

    THRIFT-5376 Fix deprecation warnings in D library
    Client: d
    Patch: James Lacey
    
    This closes #2355
---
 lib/d/test/thrift_test_client.d | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

Reply via email to