time
#include <iostream>
#include <ctime>
int main() {
time_t t = time(nullptr);
struct tm *now = localtime(&t);
std::cout << "Current time and date: " << now->tm_mday << '/'
<< (now->tm_mon + 1) << '/' << (now->tm_year + 1900) << ' '
<< now->tm_hour << ':' << now->tm_min << ':' << now->tm_sec << std::endl;
return 0;
}#include <iostream>
#include <thread>
int main() {
std::cout << "Sleeping for 5 seconds..." << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(5));
std::cout << "Done sleeping." << std::endl;
return 0;
}