I have a command that adds the timestamp at the beginning and the end (echo %time% & #other command# & echo %time%
).
However, the %time%
will be the same, regardless of how long the command took to execute.
example output:
Time start: 19:48:31.75
Pinging google.com [2a00:1450:400e:80c::200e] with 32 bytes of data:
Reply from 2a00:1450:400e:80c::200e: time=13ms
Reply from 2a00:1450:400e:80c::200e: time=13ms
Reply from 2a00:1450:400e:80c::200e: time=9ms
Reply from 2a00:1450:400e:80c::200e: time=10ms
Ping statistics for 2a00:1450:400e:80c::200e:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 9ms, Maximum = 13ms, Average = 11ms
Time end: 19:48:31.76
Is there a way to have this work, still within one line?
Thanks