Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/event/timer.h" 4 : 5 : #include "source/common/common/utility.h" 6 : 7 : namespace Envoy { 8 : namespace Event { 9 : 10 : /** 11 : * Real-world time implementation of TimeSystem. 12 : */ 13 : class RealTimeSystem : public TimeSystem { 14 : public: 15 : // TimeSystem 16 : SchedulerPtr createScheduler(Scheduler&, CallbackScheduler&) override; 17 : 18 : // TimeSource 19 5396 : SystemTime systemTime() override { return time_source_.systemTime(); } 20 56162 : MonotonicTime monotonicTime() override { return time_source_.monotonicTime(); } 21 : 22 : private: 23 : RealTimeSource time_source_; 24 : }; 25 : 26 : } // namespace Event 27 : } // namespace Envoy