c++ do every 1 minutes

#include <iostream>
#include <chrono>
#include <thread>

void doSomething() {
    // Add your code here: this function will be executed every 1 minute
    std::cout << "This function is executed every 1 minute." << std::endl;
}

int main() {
    while (true) {
        // Call the function to do something
        doSomething();

        // Wait for 1 minute before executing again
        std::this_thread::sleep_for(std::chrono::minutes(1));
    }

    return 0;
}