Felix Dombek
Felix Dombek

Reputation: 14372

Where can I find the GCC 9 implementation of std::chrono::system_clock::now()?

The chrono system header (/usr/include/c++/9/chrono) declares, but does not define, the static now() functions of its clocks. I also do not see an include that looks relevant. Where are these functions implemented?

Upvotes: 1

Views: 1541

Answers (1)

KamilCuk
KamilCuk

Reputation: 141190

Where are these functions implemented?

In your C++ standard library implementation.

GNU compiler is shipped with GNU C++ library - libstdc++. Inside gcc source tree, you may find libstdc++-v3/chrono.cc file with the implementation of chrono::now() function.

Upvotes: 5

Related Questions