0

Currently, I am attempting to use the time command to time the execution of a file using Windows 10 command prompt. Here is how I am running the command:

$time helloWorld.exe

...and this is the output that I receive:

The system cannot accept the time entered.

Enter the new time:

Is there something that I need to do to enable this command?

  • The `time` command in command prompt doesn't do what the similarly named command does on *nix; it only retrieves or sets the system time. Your example is attempting to set current time as the string "helloWorld.exe". I'd suggest searching for existing answers on Google with something like "`execution-time windows command-prompt site:stackoverflow.com`". (Dash ties words together so they have to appear next to each other.) – Silvar Feb 07 '20 at 04:20

1 Answers1

0

The time command in windows cmd doesn't returun execution time; it returns current time.

You could write a quick batch script to accomplish what you wish. I found another answer that may help. https://stackoverflow.com/a/6209392/12555304