Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:25:23+00:00 2026-06-14T18:25:23+00:00

The <chrono> header defines class steady_clock that represents a monotonic clock – that is,

  • 0

The <chrono> header defines class steady_clock that represents a monotonic clock – that is, the value of now() never decreases as physical time increases. This class isn’t marked as optional though, so what happens if the implementation can’t implement it because it is running on a system with no monotonic time source?

Taking a look at the libstdc++ source, in the case of _GLIBCXX_USE_CLOCK_MONOTONIC not being defined, steady_clock is simply defined by:

typedef system_clock steady_clock;

system_clock isn’t necessarily steady though, so this may (and probably will) break the requirements of steady_clock.

Is a conforming implementation of C++11 impossible on a system with no monotonic time source? Why not just make steady_clock optional like the intX_t types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:25:25+00:00Added an answer on June 14, 2026 at 6:25 pm

    I suppose that such a system would be some kind of embedded system.

    Well, such systems tomatoes can have freestanding implementations, which only require a minimal subset of the standard library. <chrono> is not a part of that minimal subset.

    This is defined in §17.6.1.3 Freestanding implementations [compliance]:

    1 Two kinds of implementations are defined: hosted and freestanding (1.4). For a hosted implementation, this
    International Standard describes the set of available headers.

    2 A freestanding implementation has an implementation-defined set of headers. This set shall include at least
    the headers shown in Table 16.

    Table 16 contains the following headers: <ciso646>, <cstddef>, <cfloat>, <limits>, <climits>, <cstdint>, <cstdlib>, <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>, <cstdbool>, <type_traits>, and <atomic>.

    Note that this does not mean that such an implementation cannot provide a <chrono> header with everything that can be implemented in it, but not the rest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to convert std::chrono::monotonic_clock::now() to milliseconds and cast it to long? using steady_clock or
I am using <Chronometer android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/chrono android:visibility=gone /> in my one activity now
I have auto now = std::chrono::high_resolution_clock::now(); and i want to pass it to a
#include <boost/chrono.hpp> int main() { boost::chrono::high_resolution_clock::time_point start = boost::chrono::high_resolution_clock::now(); //burn some time boost::chrono::nanoseconds ns
Imagine this C++ code (which uses clang's blocks language extension). auto now = std::chrono::system_clock::now();
First, I'm assuming that calling any function of std::chrono is guaranteed to be thread-safe
I have a fractional epoch timestamp, represented as double , that I would like
C++0x thread library or Boost.thread define a non-member variadic template function that locks all
I'm trying work with time data regarding the duration of several experiments. That data
I am keeping a large amount of words in a database that I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.