相关疑难解决方法(0)

用于在C中查找函数调用中的已用时间的计时器

我想计算在C中函数调用期间经过的时间,精度为1纳秒.

C中是否有可用的定时器功能?

如果是,请提供示例代码段.

伪代码

Timer.Start()
foo();
Timer.Stop()
Display time elapsed in execution of foo()
Run Code Online (Sandbox Code Playgroud)

环境细节: - 在RHEL机器上使用gcc 3.4编译器

c profiling timer

1
推荐指数
1
解决办法
5123
查看次数

标签 统计

c ×1

profiling ×1

timer ×1