From: Jon Hanna Date: Thu, 23 Mar 2017 04:25:58 +0000 (+0000) Subject: Named Multiply and Divide methods on TimeSpan (dotnet/coreclr#10366) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7600 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ce2165eea5dd7f33488299a3e33d53af5bfdde3;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Named Multiply and Divide methods on TimeSpan (dotnet/coreclr#10366) dotnet/corefxdotnet/coreclr#16476 Commit migrated from https://github.com/dotnet/coreclr/commit/741ce0d615bdae442cb3ee184a5a36b30d1a152a --- 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);