Fix negative dates, and time moving in opposite direction

This commit is contained in:
smoogipoo 2018-12-19 13:07:43 +09:00
parent b89a6bea4c
commit 224e644aa1

View File

@ -54,14 +54,14 @@ namespace osu.Game.Graphics
var diffToNow = DateTimeOffset.Now.Subtract(Date);
double timeUntilNextUpdate = 1000;
if (diffToNow.TotalSeconds > 60)
if (Math.Abs(diffToNow.TotalSeconds) > 120)
{
timeUntilNextUpdate *= 60;
if (diffToNow.TotalMinutes > 60)
if (Math.Abs(diffToNow.TotalMinutes) > 120)
{
timeUntilNextUpdate *= 60;
if (diffToNow.TotalHours > 24)
if (Math.Abs(diffToNow.TotalHours) > 48)
timeUntilNextUpdate *= 24;
}
}