From c86d9533bd86049314d3fef74f7cfe4628e98c24 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 19 Dec 2018 18:01:21 +0900 Subject: [PATCH] Add PollImmediately() --- osu.Game/Online/PollingComponent.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/PollingComponent.cs b/osu.Game/Online/PollingComponent.cs index d9dcfc40c2..7e5ed31491 100644 --- a/osu.Game/Online/PollingComponent.cs +++ b/osu.Game/Online/PollingComponent.cs @@ -77,13 +77,22 @@ namespace osu.Game.Online } /// - /// Perform the polling in this method. Call when done. + /// Performs a poll. Implement but do not call this. /// protected virtual Task Poll() { return Task.CompletedTask; } + /// + /// Immediately performs a . + /// + public void PollImmediately() + { + lastTimePolled = Time.Current - timeBetweenPolls; + scheduleNextPoll(); + } + /// /// Call when a poll operation has completed. ///