A Timekeeper with a dedicated thread that manages the timeouts using a heap. Timeouts can be scheduled with microsecond resolution, though in practice the accuracy depends on the OS scheduler's ability to wake up the worker thread in a timely fashion.
Synopsis
Declared in <folly/futures/HeapTimekeeper.h>
class HeapTimekeeper
: public Timekeeper
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Constructs a HeapTimekeeper and starts its dedicated worker thread. |
|
Destroys the HeapTimekeeper and stops its worker thread. |
|
Schedules a timeout that completes after the given duration. |
Unsafe version of after that returns an inline Future. Any work added to this future will run inline on the Timekeeper's thread. This can potentially cause problems with timing. |
|
Returns a future that will complete at the requested time. |
|
Unsafe version of at that returns an inline Future. Any work added to this future will run inline on the Timekeeper's thread. This can potentially cause problems with timing. |