diff options
Diffstat (limited to 'Util.cs')
| -rw-r--r-- | Util.cs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 { |
