音频/显卡作为廉价的精密时钟
据我所知,现代音频/图形卡上有精密时钟,我想它们优于通用 PC 时钟。
是否可以使用音频或显卡内部时钟作为 Windows 上的精确时钟?在 Windows 应用程序中接收相关卡的事件/中断?
编辑 受到汉斯评论的启发,我想澄清一下。虽然我的同步效果还不错,但离理想还很远。使用网络来实现时间精度是我最不想要的。这就是为什么我想使用一些稳定的内部时钟。稳定是这里的关键词。尽管 Ben 认为 PC 时钟没问题,但事实并非如此。漂移是巨大的。在负载下,W2K 8 线程 Xeon 可以在短短几秒钟内轻松上下跳动 30ms。最重要的是稳定性,而不是时钟的分辨率。我只是猜测任何像样的稳定时钟都会具有比 1ms 更好的分辨率 - 我从 Stratum 2 获得的时钟。让我重申一下 - 最终我需要一个每 1 分钟漂移 1ns 且分辨率至少为 250us 的时钟( 100-150 英镑!
I understand that modern audio/graphic cards have precision clocks on board and I guess they are superior to a generic PC clock.
Is it possible to use audio or graphic card internal clock as a precision clock on Windows? Receive events/interrupts in a Windows application for the card in question?
EDIT Inspired by Hans's comment I want to clarify. Although I do have not bad sync in place it is very far from ideal. Using network for time precision is the last think I want. this is why I want to use some internal clock which is stable. Stable is key word here. Although Ben suggests that PC clocks are fine they are not. Drift is enormous. Under load W2K 8 threads Xeon can bounce easily 30ms up and down in just few seconds. Stability is a paramount, not resolution of the clock. I just guess any decent stable clock will have better resolution than 1ms - the one I have from Stratum 2. Let me reiterate - ultimately I need a clock with 1ns per 1 min drift and at least 250us resolution (for £100-150! if you please) :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有任何电子设备具有 1 纳秒/分钟的容差。
这是我能找到的最好的:
它的漂移是5ns/sec,差了300倍这就是你所要求的。并且已经达到了您的价格范围的上限。并且不包含任何支持/接口电路以使其与您的计算机一起工作。
你需要一些更昂贵的东西才能做得更好。
No electronics have 1ns/min tolerance.
Here's the best I could find:
Its drift is 5ns/sec, which is 300 times worse that what you're asking for. And already at the upper limit of your price range. And doesn't include any of the support/interfacing circuitry to make it work with your computer.
You need something much pricier to do better.
Windows 应用程序无法接收中断,只有内核模式驱动程序可以。内核模式驱动程序可以生成唤醒或以其他方式触发应用程序的事件,但会增加延迟,使其作为计时器并不比 PC 计时器/调度程序量程更好。
我想您是在问是否有任何供应商驱动程序向应用程序提供计时信息?我不知道根本没有办法,但没有标准化的方法可以在硬件模型之间合理移植(至少比你的帧速率更精确,这比你的帧速率更糟糕 PC 定时器/调度程序量子)。
Windows applications can't receive interrupts, only kernel mode drivers can. The kernel mode driver can generate an event that wakes or otherwise triggers the application, but there'll be added delay, making it no better as a timer than the PC timer / scheduler quantum.
I suppose you're asking whether any of the vendor drivers provide timing information to applications? I don't know that there's no way at all, but there's no standardized way to that would be reasonably portable across hardware models (at least with better precision than your frame rate, which is much worse than the PC timer / scheduler quantum).