how to measure time? [duplicate]
问题 This question already has answers here : Resolution of std::chrono::high_resolution_clock doesn't correspond to measurements (3 answers) Closed 5 years ago . I know there are many topics for finding elapse time of a code and I have read many, but i really get confused I decided to use high resolution clock and ran this code to see how many times a second the clock ticks cout << chrono::high_resolution_clock::period::den << endl; output:10000000 and then I defined the begin time and the end