como medir tiempo de ejecucion cpp

#include <iostream>
#include <chrono>

int main() {
    // Record the start time
    auto start_time = std::chrono::high_resolution_clock::now();

    // Code to measure execution time
    // ...

    // Record the end time
    auto end_time = std::chrono::high_resolution_clock::now();

    // Calculate the duration of the code execution
    auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end_time - start_time);

    // Print the execution time in microseconds
    std::cout << "Execution Time: " << duration.count() << " microseconds" << std::endl;

    return 0;
}