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

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>
/// Perform the polling in this method. Call <see cref="pollComplete"/> when done.
/// Performs a poll. Implement but do not call this.
/// </summary>
protected virtual Task Poll()
{
return Task.CompletedTask;
}
/// <summary>
/// Immediately performs a <see cref="Poll"/>.
/// </summary>
public void PollImmediately()
{
lastTimePolled = Time.Current - timeBetweenPolls;
scheduleNextPoll();
}
/// <summary>
/// Call when a poll operation has completed.
/// </summary>