mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Add PollImmediately()
This commit is contained in:
parent
673082445e
commit
c86d9533bd
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user