From 6ce2165eea5dd7f33488299a3e33d53af5bfdde3 Mon Sep 17 00:00:00 2001 From: Jon Hanna Date: Thu, 23 Mar 2017 04:25:58 +0000 Subject: [PATCH] Named Multiply and Divide methods on TimeSpan (dotnet/coreclr#10366) dotnet/corefxdotnet/coreclr#16476 Commit migrated from https://github.com/dotnet/coreclr/commit/741ce0d615bdae442cb3ee184a5a36b30d1a152a --- src/coreclr/src/mscorlib/src/System/TimeSpan.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coreclr/src/mscorlib/src/System/TimeSpan.cs b/src/coreclr/src/mscorlib/src/System/TimeSpan.cs index 35be47f..9166656 100644 --- a/src/coreclr/src/mscorlib/src/System/TimeSpan.cs +++ b/src/coreclr/src/mscorlib/src/System/TimeSpan.cs @@ -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); -- 2.7.4