_.cpp enhanced with time measurement.
This commit is contained in:
@@ -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 )
|
||||||
|
|||||||
Reference in New Issue
Block a user