Class Clock

Inheritance Relationships

Derived Type

Class Documentation

class Clock

Subclassed by mir::time::SteadyClock

Public Functions

virtual ~Clock() = default
virtual Timestamp now() const = 0

The current time according to this clock.

virtual Duration min_wait_until(Timestamp t) const = 0

The minimum amount of real time we would have to wait for this clock to reach or surpass the specified timestamp.

For clocks that deal in real time (i.e., most production implementations), this will just be max(t - now(), 0). However, fake clocks may return different durations.

Protected Functions

Clock() = default
Clock(Clock const&) = delete
Clock &operator=(Clock const&) = delete