
我有一個命令在開頭和結尾添加時間戳記 ( echo %time% & #other command# & echo %time%
)。但是,%time%
無論命令執行需要多長時間,結果都是相同的。
範例輸出:
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
有沒有辦法在一行內完成這項工作?
謝謝