How do I measure execution time of a command on the Windows command line?

后端 未结 30 3308
南笙
南笙 2020-11-22 09:44

Is there a built-in way to measure execution time of a command on the Windows command line?

30条回答
  •  深忆病人
    2020-11-22 10:07

    This is a comment/edit to Luke Sampson's nice timecmd.bat and reply to

    For some reason this only gives me output in whole seconds... which for me is useless. I mean that I run timecmd pause, and it always results in 1.00 sec, 2.00 sec, 4.00 sec... even 0.00 sec! Windows 7. – Camilo Martin Sep 25 '13 at 16:00 "

    On some configurations the delimiters may differ. The following change should cover atleast most western countries.

    set options="tokens=1-4 delims=:,." (added comma)
    

    The %time% milliseconds work on my system after adding that ','

    (*because site doesn't allow anon comment and doesn't keep good track of identity even though I always use same guest email which combined with ipv6 ip and browser fingerprint should be enough to uniquely identify without password)

提交回复
热议问题