#include <chrono>
#include <iostream>
class Timer
{
public:
Timer()
{
start = std::chrono::high_resolution_clock::now();
}
~Timer(){
end = std::chrono::high_resolution_clock::now();
std::chrono::duration<float> duration = end - start;
std::cout << "Time : "<<duration.count()<<endl;
}
private:
std::chrono::time_point<std::chrono::high_resolution_clock> start, end;
};
int main(){
Timer t;
//весь остальной код
}
$ time yourapplication