Check out example codes for "how to measure program run time 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;

Learn ReactJs, React Native from akashmittal.com