#ifndef COMPLIB_SERVER_CACHE_HPP #define COMPLIB_SERVER_CACHE_HPP #include class Cache { public: explicit Cache(int rate_hz); bool is_expired(); void update(); private: typedef std::chrono::steady_clock clock; std::chrono::microseconds cache_duration{}; std::chrono::time_point last_update{}; }; #endif //COMPLIB_SERVER_CACHE_HPP