summaryrefslogtreecommitdiff
path: root/Util.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-06-19 02:21:16 +1000
committerJake Mannens <jake@asger.xyz>2026-06-19 02:21:16 +1000
commit79d383f6f48df0078e6ba13239f9c4c94fbc9ea6 (patch)
tree4450904ebdc5083a69f544e49478281ebbc2429e /Util.cs
parente556de927015acd8d9934e68707a95901acfad8e (diff)
v0.19av0.19a
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 {