Loading...
Searching...
No Matches
caf::actor_clock Class Referenceabstract

A monotonic clock for scheduling timeouts and delayed messages. More...

`#include <actor_clock.hpp>`

## Public Types

using | clock_type = std::chrono::steady_clock
| Underlying clock type.
using | time_point = typename clock_type::time_point
| Discrete point in time.
using | duration_type = typename clock_type::duration
| Difference between two points in time.

## Public Member Functions

virtual time_point | now () const noexcept
| Returns the current wall-clock time.
virtual duration_type | difference (atom_value measurement, long units, time_point t0, time_point t1) const noexcept
| Returns the difference between t0 and t1, allowing the clock to return an arbitrary value depending on the measurement that took place and the units measured.
virtual void | set_ordinary_timeout (time_point t, abstract_actor *self, atom_value type, uint64_t id)=0
| Schedules a timeout_msg for self at time point t, overriding any previous receive timeout.
virtual void | set_multi_timeout (time_point t, abstract_actor *self, atom_value type, uint64_t id)=0
| Schedules a timeout_msg for self at time point t.
virtual void | set_request_timeout (time_point t, abstract_actor *self, message_id id)=0
| Schedules a sec::request_timeout for self at time point t.
virtual void | cancel_ordinary_timeout (abstract_actor *self, atom_value type)=0
| Cancels a pending receive timeout.
virtual void | cancel_request_timeout (abstract_actor *self, message_id id)=0
| Cancels the pending request timeout for id.
virtual void | cancel_timeouts (abstract_actor *self)=0
| Cancels all timeouts for self.
virtual void | schedule_message (time_point t, strong_actor_ptr receiver, mailbox_element_ptr content)=0
| Schedules an arbitrary message to receiver for time point t.
virtual void | schedule_message (time_point t, group target, strong_actor_ptr sender, message content)=0
| Schedules an arbitrary message to target for time point t.
virtual void | cancel_all ()=0
| Cancels all timeouts and scheduled messages.

## Detailed Description

A monotonic clock for scheduling timeouts and delayed messages.

The documentation for this class was generated from the following file:

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/actor_clock.hpp