Add PollImmediately()

This commit is contained in:
smoogipoo 2018-12-19 18:01:21 +09:00
parent 673082445e
commit c86d9533bd

View File

@ -77,13 +77,22 @@ namespace osu.Game.Online
} }
/// <summary> /// <summary>
/// Perform the polling in this method. Call <see cref="pollComplete"/> when done. /// Performs a poll. Implement but do not call this.
/// </summary> /// </summary>
protected virtual Task Poll() protected virtual Task Poll()
{ {
return Task.CompletedTask; return Task.CompletedTask;
} }
/// <summary>
/// Immediately performs a <see cref="Poll"/>.
/// </summary>
public void PollImmediately()
{
lastTimePolled = Time.Current - timeBetweenPolls;
scheduleNextPoll();
}
/// <summary> /// <summary>
/// Call when a poll operation has completed. /// Call when a poll operation has completed.
/// </summary> /// </summary>