实现计算某段程序计算时间的毫秒级时间记录:
#include <iostream>
#include <chrono>
using std::chrono::high_resolution_clock;
using std::chrono::milliseconds;
int main()
{
high_resolution_clock::time_point beginTime = high_resolution_clock::now();
...
do some stuff
...
high_resolution_clock::time_point endTime = high_resolution_clock::now();
milliseconds timeInterval = std::chrono::duration_cast<milliseconds>(endTime - beginTime);
std::cout << timeInterval.count() << "ms\n";
}
————————————————
版权声明:本文为CSDN博主「TheOneGIS」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/theonegis/article/details/52754069
关于在类中使用线程;https://blog.csdn.net/gychixxx/article/details/78875061
关于
/usr/include/eigen3/Eigen/src/StlSupport/StdVector.h:69: error: partial specialization of ‘std::vector<T, Eigen::aligned_allocator<U> >’ after instantiation of ‘std::vector<dso::IOWrap::GraphConnection, Eigen::aligned_allocator<dso::IOWrap::GraphConnection> >’ [-fpermissive]
class vector<T,EIGEN_ALIGNED_ALLOCATOR<T> >
^
/usr/include/eigen3/Eigen/src/StlSupport/StdVector.h:69: error: partial specialization of ‘std::vector<T, Eigen::aligned_allocator<U> >’ after instantiation of ‘std::vector<Eigen::Matrix<float, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<float, 3, 1> > >’ [-fpermissive]
/usr/include/eigen3/Eigen/src/StlSupport/StdVector.h:69: error: partial specialization of ‘std::vector<T
在对应使用了eigen的STL添加#include <Eigen/StdVector>