#include #include #include typedef std::chrono::system_clock::time_point tp_t; typedef std::chrono::nanoseconds ns_t; int main () { tp_t start = std::chrono::high_resolution_clock::now(); std::this_thread::sleep_for(std::chrono::nanoseconds(100000)); tp_t stop = std::chrono::high_resolution_clock::now(); std::cout << "Elapsed time: " << std::chrono::duration_cast(stop - start).count() << " in nanos." << std::endl; return 0; }