#include<iostream>
#include<thread>
using namespace std;
using namespace std::chrono; //增加引用空间
template<class T>
void measure(T&& func) {
auto beg_t = system_clock::now(); //开始时间 时间为微妙
func(); //执行函数
auto end_t = system_clock::now(); //结束时间
duration<double> diff = end_t - beg_t;
}
auto sta_allx = std::chrono::system_clock::now();
auto end_allx = std::chrono::system_clock::now();
std::cout << "sub image ----->:"
<< std::chrono::duration_cast<std::chrono::milliseconds>(end_allx - sta_allx).count() << "ms"
<< std::endl;