mardi 24 mai 2016

What are the uses of std::high_resolution_clock?

At first I thought it can be used for performance measurements. But it is said that std::high_resolution_clock may be not steady (is_steady may be false). It is also said that std::high_resolution_clock may even be an alias of std::chrono::system_clock which is generally not steady. So I can't measure time intervals with this type of clock because at any moment the clock may be adjusted and my measurements will be wrong.

At the same time I can't convert time points of std::high_resolution_clock to calendar time because it doesn't have to_time_t method. So I can't get the real time with this type of clock either.

Then what can std::high_resolution_clock be used for?

Aucun commentaire:

Enregistrer un commentaire