1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 06:37:43 +08:00

use .ToFormattedDuration

This commit is contained in:
Shin Morisawa 2024-11-14 16:59:03 +09:00
parent 64e7e44f28
commit 7dff243e6a
No known key found for this signature in database
GPG Key ID: 62E23861D492B078

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Game.Extensions;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets;
@ -147,7 +148,7 @@ namespace osu.Game.Beatmaps.Drawables
overallDifficulty.Text = @" OD: " + adjustedDifficulty.OverallDifficulty.ToString(@"0.##");
TimeSpan lengthTimeSpan = TimeSpan.FromMilliseconds(displayedContent.BeatmapInfo.Length / rate);
length.Text = "Length: " + (lengthTimeSpan.TotalHours >= 1 ? lengthTimeSpan.ToString(@"hh\:mm\:ss") : lengthTimeSpan.ToString(@"mm\:ss"));
length.Text = "Length: " + lengthTimeSpan.ToFormattedDuration();
bpm.Text = " BPM: " + Math.Round(bpmAdjusted, 0);
}