Terminal 要在Windows 10命令提示符下启用time命令,我必须做什么?

Terminal 要在Windows 10命令提示符下启用time命令,我必须做什么?,terminal,Terminal,目前,我正在尝试使用time命令来计时使用Windows 10命令提示符执行文件的时间。下面是我运行命令的方式: $time helloWorld.exe …这是我收到的输出: The system cannot accept the time entered. Enter the new time: 是否需要执行某些操作才能启用此命令?windows cmd中的time命令不会重新调用执行时间;它返回当前时间 您可以编写一个快速批处理脚本来完成您想要的任务。我找到了另一个可能有用的答案

目前,我正在尝试使用time命令来计时使用Windows 10命令提示符执行文件的时间。下面是我运行命令的方式:

$time helloWorld.exe
…这是我收到的输出:

The system cannot accept the time entered.

Enter the new time:

是否需要执行某些操作才能启用此命令?

windows cmd中的time命令不会重新调用执行时间;它返回当前时间


您可以编写一个快速批处理脚本来完成您想要的任务。我找到了另一个可能有用的答案

命令提示符中的
time
命令与*nix上的同名命令不同;它仅检索或设置系统时间。您的示例试图将当前时间设置为字符串“helloWorld.exe”。我建议用类似“
执行时间windows命令提示符站点:stackoverflow.com
”的东西在谷歌上搜索现有答案。(破折号将单词连接在一起,因此它们必须相邻出现。)