Skip to content
Snippets Groups Projects
Commit 2577193b authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Use HumanSince() for grace notification delta.

Refers to #6, #25
parent 6cf8ab22
No related branches found
No related tags found
No related merge requests found
......@@ -210,9 +210,9 @@ namespace ATxService
if (string.IsNullOrEmpty(report))
return "";
var delta = TimeUtils.MinutesSince(_status.LastGraceNotification);
report += $"\nTime since last grace notification: {TimeUtils.MinutesToHuman(delta)}\n";
if (delta < _config.GraceNotificationDelta)
report += "\nTime since last grace notification: " +
$"{TimeUtils.HumanSince(_status.LastGraceNotification)}\n";
if (TimeUtils.MinutesSince(_status.LastGraceNotification) < _config.GraceNotificationDelta)
return report;
_status.LastGraceNotification = DateTime.Now;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment