proxygen
wangle::TimekeeperTester Class Reference
Inheritance diagram for wangle::TimekeeperTester:
folly::Timekeeper

Public Member Functions

Future< Unitafter (Duration) override
 
template<class Clock >
Future< Unitat (std::chrono::time_point< Clock >)
 
- Public Member Functions inherited from folly::Timekeeper
virtual ~Timekeeper ()=default
 
template<class Clock >
Future< Unitat (std::chrono::time_point< Clock > when)
 

Public Attributes

std::vector< Promise< Unit > > promises_
 

Detailed Description

Definition at line 258 of file ServiceTest.cpp.

Member Function Documentation

Future<Unit> wangle::TimekeeperTester::after ( Duration  dur)
inlineoverridevirtual

Returns a future that will complete after the given duration with the elapsed time. Exceptional errors can happen but they must be exceptional. Use the steady (monotonic) clock.

The consumer thread may cancel this Future to reclaim resources.

This future probably completes on the timer thread. You should almost certainly follow it with a via() call or the accuracy of other timers will suffer.

Implements folly::Timekeeper.

Definition at line 260 of file ServiceTest.cpp.

References f, folly::Promise< T >::getFuture(), and folly::gen::move.

260  {
261  Promise<Unit> p;
262  auto f = p.getFuture();
263  promises_.push_back(std::move(p));
264  return f;
265  }
auto f
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::vector< Promise< Unit > > promises_
Future< T > getFuture()
Definition: Promise-inl.h:97
template<class Clock >
Future<Unit> wangle::TimekeeperTester::at ( std::chrono::time_point< Clock >  )
inline

Definition at line 267 of file ServiceTest.cpp.

References f, folly::Promise< T >::getFuture(), and folly::gen::move.

267  {
268  Promise<Unit> p;
269  auto f = p.getFuture();
270  promises_.push_back(std::move(p));
271  return f;
272  }
auto f
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::vector< Promise< Unit > > promises_
Future< T > getFuture()
Definition: Promise-inl.h:97

Member Data Documentation

std::vector<Promise<Unit> > wangle::TimekeeperTester::promises_

Definition at line 273 of file ServiceTest.cpp.

Referenced by wangle::TEST().


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