Timeit
一、度量函数的耗时,是各种programming language中的一个任务,本文描述C++中如何来实现这个需求。
二、参考如下:
1、stackoverflow Measuring execution time of a function in C++
2、stackoverflow How to Calculate Execution Time of a Code Snippet in C++
3、stackoverflow how to write a C++ class member function wrapper?
4、
https://en.cppreference.com/w/cpp/utility/functional/bind
https://en.cppreference.com/w/cpp/utility/functional/mem_fn
我的实现
参见当前目录的func_timer.h