From a77baf87170a9513de76480ae630336b979748d8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Feb 2023 23:42:44 +0900 Subject: [PATCH] Output gameplay clock progress in `PlayerTestScene`s --- osu.Game/Tests/Visual/PlayerTestScene.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/osu.Game/Tests/Visual/PlayerTestScene.cs b/osu.Game/Tests/Visual/PlayerTestScene.cs index 3ecc5a3280..0392e3ae52 100644 --- a/osu.Game/Tests/Visual/PlayerTestScene.cs +++ b/osu.Game/Tests/Visual/PlayerTestScene.cs @@ -7,6 +7,7 @@ using System.Linq; using JetBrains.Annotations; using osu.Framework.Allocation; +using osu.Framework.Logging; using osu.Framework.Testing; using osu.Game.Configuration; using osu.Game.Rulesets; @@ -25,6 +26,24 @@ public abstract partial class PlayerTestScene : RateAdjustedBeatmapTestScene protected OsuConfigManager LocalConfig; + private double lastReportedTime; + + protected override void Update() + { + base.Update(); + + if (Player?.GameplayClockContainer != null) + { + int roundedTime = (int)Player.GameplayClockContainer.CurrentTime / 1000; + + if (roundedTime != lastReportedTime) + { + lastReportedTime = roundedTime; + Logger.Log($"⏱️ Gameplay clock reached {lastReportedTime * 1000:N0} ms"); + } + } + } + [BackgroundDependencyLoader] private void load() {