KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I just noticed the following code in <chrono.h> , which doesn't make sense to me. struct system_clock { static const bool is_monotonic = false; // retained static const bool is_steady = false; }; class steady_clock : public system_clock { // wraps monotonic clock public: static const bool is_monotonic = true; // retained static const bool is_steady = true; }; typedef steady_clock monotonic_clock; // retained typedef system_clock high_resolution_clock; How can steady_clock be steady when it simply derives from system_clock which is not steady?
Tags (comma-separated)
Save Edits
Cancel