Named Multiply and Divide methods on TimeSpan (#10366)
authorJon Hanna <jon@hackcraft.net>
Thu, 23 Mar 2017 04:25:58 +0000 (04:25 +0000)
committerDan Moseley <danmose@microsoft.com>
Thu, 23 Mar 2017 04:25:58 +0000 (21:25 -0700)
dotnet/corefx#16476

src/mscorlib/src/System/TimeSpan.cs

index 35be47f..9166656 100644 (file)
@@ -292,6 +292,12 @@ namespace System
             return new TimeSpan(result);
         }
 
+        public TimeSpan Multiply(double factor) => this * factor;
+
+        public TimeSpan Divide(double divisor) => this / divisor;
+
+        public double Divide(TimeSpan ts) => this / ts;
+
         public static TimeSpan FromTicks(long value)
         {
             return new TimeSpan(value);