Mir
Public Member Functions | Protected Member Functions | List of all members
mir::time::Clock Class Referenceabstract

#include <clock.h>

Inheritance diagram for mir::time::Clock:
[legend]

Public Member Functions

virtual ~Clock ()=default
 
virtual Timestamp now () const =0
 The current time according to this clock. More...
 
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. More...
 

Protected Member Functions

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

Constructor & Destructor Documentation

virtual mir::time::Clock::~Clock ( )
virtualdefault
mir::time::Clock::Clock ( )
protecteddefault
mir::time::Clock::Clock ( Clock const &  )
protecteddelete

Member Function Documentation

virtual Duration mir::time::Clock::min_wait_until ( Timestamp  t) const
pure virtual

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.

Implemented in mir::time::SteadyClock.

virtual Timestamp mir::time::Clock::now ( ) const
pure virtual

The current time according to this clock.

Implemented in mir::time::SteadyClock.

Clock& mir::time::Clock::operator= ( Clock const &  )
protecteddelete

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

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016