mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Add PollImmediately()
This commit is contained in:
parent
673082445e
commit
c86d9533bd
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user