projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f36d5b0
)
Named Multiply and Divide methods on TimeSpan (#10366)
author
Jon Hanna
<jon@hackcraft.net>
Thu, 23 Mar 2017 04:25:58 +0000
(
04:25
+0000)
committer
Dan Moseley
<danmose@microsoft.com>
Thu, 23 Mar 2017 04:25:58 +0000
(21:25 -0700)
dotnet/corefx#16476
src/mscorlib/src/System/TimeSpan.cs
patch
|
blob
|
history
diff --git
a/src/mscorlib/src/System/TimeSpan.cs
b/src/mscorlib/src/System/TimeSpan.cs
index
35be47f
..
9166656
100644
(file)
--- a/
src/mscorlib/src/System/TimeSpan.cs
+++ b/
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);