Windows C ++纳秒时序? [英] Windows C++ nanosecond timing?

查看:636
本文介绍了Windows C ++纳秒时序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows上的C ++中有没有办法以纳秒为单位测量时间?

Is there a way in C++ on windows to measure time in nanoseconds?

我可以找到的都是linux解决方案。

All i can find are linux solutions.

推荐答案

使用 QueryPerformanceFrequency 函数来查看QueryPerformanceCounter运行的速度。我认为它可能在纳秒范围内。

Use the QueryPerformanceFrequency function to see what speed the QueryPerformanceCounter runs at. I think it might be in the nanosecond range.

这篇关于Windows C ++纳秒时序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆