summaryrefslogtreecommitdiff
path: root/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Util.cs')
-rw-r--r--Util.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Util.cs b/Util.cs
index 7de2b6e..532064e 100644
--- a/Util.cs
+++ b/Util.cs
@@ -35,6 +35,11 @@ public static class Extensions {
return string.Format("{0:0}h{0:0}m", t.TotalHours, t.Minutes);
return string.Format("{0:0.00}d", t.TotalDays);
}
+
+ public static int GetRoundedHashCode(this DateTime dt) {
+ var t = dt.ToUniversalTime();
+ return HashCode.Combine(t.Year, t.Month, t.Date, t.Hour, t.Minute, t.Second);
+ }
}
public class LimitedConcurrencyTaskScheduler : TaskScheduler {