What are the knowledge points of censor 11 chrono
This article mainly introduces "what are the knowledge points of 11 chrono?". In the daily operation, I believe many people have doubts about the knowledge points of 11 chrono. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the questions of "what are the knowledge points of 11 chrono?" Next, please follow the editor to study!
Chrono is the time library in C++ 11, providing timing, clock and other functions.
The key to learning chrono is to understand the concepts of time period (Durations) and time point (Time points).
1. Precision:
Clock beat (time accuracy):
Template class ratio
Where N represents the numerator and D represents the denominator, which defaults to the unit of time expressed in seconds.
N corresponds to its member num,D corresponds to its member den
Commonly used units:
Ratio minute
Ratio second
Ratio millisecond
...
The main purpose of ratio is to provide precision (units) for the time period, time point, etc., which will be explained later.
# include#includeusing namespace std;int main () {cout