本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/142656082
目标
快速检测一个函数耗时
测试
1 |
|
效果
{“profileData”:[{},
{
“type” : “function”,
“name” : “void test(void)”,
“thread id” : 30040,
“average duration” : “1010.000000000ms”
}]}
profiler.h
1 |
|
profiler.cpp
1 |
|
创作不易,小小的支持一下吧!

