Check out example codes for "Timing in C++". It will help you in understanding the concepts better.

Code Example 1

#include <chrono> 

auto start = chrono::high_resolution_clock::now(); 

// CODE

auto stop = chrono::high_resolution_clock::now();
auto duration = duration_cast<microseconds>(stop - start);
cout << duration.count() << endl;

Code Example 2

timing

Learn ReactJs, React Native from akashmittal.com