12 #include <glog/logging.h> 17 template <
typename ClockType = std::chrono::steady_clock>
21 void advance(std::chrono::milliseconds ms) {
26 CHECK(t.time_since_epoch() >
t_.time_since_epoch())
27 <<
"Time can not move backwards";
34 std::chrono::time_point<ClockType>
now()
const override {
39 std::chrono::time_point<ClockType>
t_;
std::chrono::time_point< ClockType > t_
void setCurrentTime(std::chrono::time_point< ClockType > t)
std::chrono::time_point< ClockType > now() const override
void advance(std::chrono::milliseconds ms)