Метод | Описание | |
---|---|---|
AddTimer ( long timeout, [ sink, int id ) : void |
Add a TimerInfo to the internal list, created from the given sink and id - to expire in the given number of milliseconds. Afterward the expiration method TimerEvent on the sink object will be called with argument set to id.
|
|
CancelTimer ( [ sink, int id ) : void |
Cancel the timer that was created with the given sink object with the given Id. The complexity of this operation is O(n). We assume it is rarely used. |
Метод | Описание | |
---|---|---|
AdjustLoad ( int amount ) : void |
Add the given amount to the load. This is called by individual poller implementations to manage the load. This is thread-safe. |
|
ExecuteTimers ( ) : int |
Execute any timers that are due. Return the number of milliseconds to wait to match the next timer or 0 meaning "no timers".
|
|
PollerBase ( ) : System.Collections.Generic |
Create a new PollerBase object - which simply creates an empty m_timers collection.
|
public AddTimer ( long timeout, [ sink, int id ) : void | ||
timeout | long | the timeout-period in milliseconds of the new timer |
sink | [ | the IProactorEvents to add for the sink of the new timer |
id | int | the Id to assign to the new TimerInfo |
Результат | void |
public CancelTimer ( [ sink, int id ) : void | ||
sink | [ | the ITimerEvent that the timer was created with |
id | int | the Id of the timer to cancel |
Результат | void |
protected PollerBase ( ) : System.Collections.Generic | ||
Результат | System.Collections.Generic |