_.cpp enhanced with time measurement.

This commit is contained in:
2018-04-29 09:28:43 +01:00
parent 2385aec24a
commit 3855301d0e

View File

@@ -8,10 +8,18 @@ VIM-: let b:argv=""
*/ */
#include <iostream> #include <iostream>
#include <exception> #include <exception>
#include <chrono>
int main ( void ) int main ( void )
{try{ {try{
auto begin = std::chrono::high_resolution_clock::now();
//......
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> seconds = end - begin;
std::cout << "Time: " << seconds.count() << std::endl;
return 0; return 0;
} }
catch ( const std::exception& e ) catch ( const std::exception& e )