|
trantor
Non-blocking I/O cross-platform TCP network library, using C++14
|
This class implements a timer strategy with high performance and low accuracy. This is usually used internally. More...
#include <trantor/utils/TimingWheel.h>
Classes | |
| class | CallbackEntry |
Public Member Functions | |
| TimingWheel (trantor::EventLoop *loop, size_t maxTimeout, float ticksInterval=TIMING_TICK_INTERVAL, size_t bucketsNumPerWheel=TIMING_BUCKET_NUM_PER_WHEEL) | |
| Construct a new timing wheel instance. | |
| void | insertEntry (size_t delay, EntryPtr entryPtr) |
| void | insertEntryInloop (size_t delay, EntryPtr entryPtr) |
| EventLoop * | getLoop () |
This class implements a timer strategy with high performance and low accuracy. This is usually used internally.
| trantor::TimingWheel::TimingWheel | ( | trantor::EventLoop * | loop, |
| size_t | maxTimeout, | ||
| float | ticksInterval = TIMING_TICK_INTERVAL, | ||
| size_t | bucketsNumPerWheel = TIMING_BUCKET_NUM_PER_WHEEL ) |
Construct a new timing wheel instance.
| loop | The event loop in which the timing wheel runs. |
| maxTimeout | The maximum timeout of the timing wheel. |
| ticksInterval | The internal timer tick interval. It affects the accuracy of the timing wheel. |
| bucketsNumPerWheel | The number of buckets per wheel. |