datetime - 如何同步机器时间

标签 datetime batch-file

我一次在 4 台机器上工作。这是一个实时环境,所以我必须将时间同步到毫秒,有没有办法以毫秒精度同步系统时钟?

目前,我正在借助批处理脚本命令 NET TIME\\TIMESRV/SET/YES 同步机器,但我不确定它是否能同步机器时间到毫秒。还有其他方法可以做到这一点吗?

最佳答案

微软不保证这样的精度:

We do not guarantee and we do not support the accuracy of the W32Time service between nodes on a network. The W32Time service is not a full-featured NTP solution that meets time-sensitive application needs.

The W32Time service is primarily designed to do the following:

  • Make the Kerberos version 5 authentication protocol work.
  • Provide loose sync time for client computers.

The W32Time service cannot reliably maintain sync time to the range of 1 to 2 seconds. Such tolerances are outside the design specification of the W32Time service.

http://support.microsoft.com/kb/939322/en-us

关于datetime - 如何同步机器时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10480407/

相关文章:

batch-file - 如何使用bat脚本将命令表达式的结果存储在变量中?

python - 时间轴精确绘图

c# - 如何在 C# 中将 "91212"解析为 "Hmmss"?

datetime - Dart DateTime 坏了?

C# 根据日期时间值和 ID 从数据库获取约会

windows - 使用批处理脚本多次运行程序

windows - 将具有属性的目录批处理到 csv

python - 在 Python 中镜像日期

windows - 如何创建批处理文件以重命名文件夹中的大量文件?

batch-file - 无论如何要在批处理文件中为用户输入预设数据?