4#include <boost/asio/deadline_timer.hpp>
10 typedef boost::asio::deadline_timer::traits_type source_traits;
23 static
bool is_set() {
return mock_enabled_; }
33 return d < boost::posix_time::milliseconds( 1 ) ?
d : boost::posix_time::milliseconds( 1 );
40 static bool mock_enabled_;
41 static const boost::posix_time::ptime epoch_;
42 static std::atomic<int64_t> now_;
45typedef boost::asio::basic_deadline_timer<boost::posix_time::ptime, mock_time_traits>
mock_deadline_timer;
mock out fc::time_point::now() and provide a mock deadline timer
static fc::time_point fc_now()
static time_type now() noexcept
static time_type add(time_type t, duration_type d)
static void set_now(time_type t)
source_traits::time_type time_type
static boost::posix_time::time_duration to_posix_duration(duration_type d)
source_traits::duration_type duration_type
static duration_type subtract(time_type t1, time_type t2)
static bool less_than(time_type t1, time_type t2)
boost::asio::basic_deadline_timer< boost::posix_time::ptime, mock_time_traits > mock_deadline_timer