通过Boost.Chrono获取时间戳纳秒的分辨率 [英] Get time stamp via Boost.Chrono in resolution of nanoseconds
本文介绍了通过Boost.Chrono获取时间戳纳秒的分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请问提升时辰提供纳秒分辨率时间戳?如果是如何得到的时间戳?
Does boost chrono provides time stamp with nanoseconds resolution?? If yes how to get the time stamp?
推荐答案
十亿分之一秒分辨率?在哪个硬件你想运行您的程序?
在我的电脑,我的性能计数器具有约的频率。 4兆赫,因此蜱最后250纳秒。
Nanoseconds resolution ? On which hardware do you want to run your program ? On my PC, my performance counter has a frequency of approx. 4 Mhz, so a tick last 250 ns.
由于这里回答,提振时辰可以给你纳秒的分辨率,但你不能确定的测量的准确度。
As answered here, boost chrono can give you the nanosecond resolution, but you will not be sure of the measure's accuracy.
这篇关于通过Boost.Chrono获取时间戳纳秒的分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文