Named Multiply and Divide methods on TimeSpan (dotnet/coreclr#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/corefxdotnet/coreclr#16476

Commit migrated from https://github.com/dotnet/coreclr/commit/741ce0d615bdae442cb3ee184a5a36b30d1a152a

src/coreclr/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);