22 #ifndef NDN_TIME_UNIT_TEST_CLOCK_HPP 23 #define NDN_TIME_UNIT_TEST_CLOCK_HPP 36 template<
class BaseClock>
43 return nanoseconds::zero();
60 return seconds(1415684132);
72 template<
class BaseClock>
83 advance(
const nanoseconds& duration);
89 setNow(
const nanoseconds& timeSinceEpoch);
93 getSince()
const override;
95 typename BaseClock::time_point
96 getNow()
const override;
98 boost::posix_time::time_duration
99 toPosixDuration(
const typename BaseClock::duration& duration)
const override;
102 nanoseconds m_currentTime;
114 #endif // NDN_TIME_UNIT_TEST_CLOCK_HPP Copyright (c) 2013-2017 Regents of the University of California.
UnitTestClock< system_clock > UnitTestSystemClock
Class implementing custom system or steady clock behavior.
Clock that can be used in unit tests for time-dependent tests independent of wall clock...
UnitTestClock< steady_clock > UnitTestSteadyClock
static nanoseconds getDefaultStartTime()
static nanoseconds getDefaultStartTime()
Traits for UnitTestClock, defining default behavior for different clocks.