Sunday, October 29, 2006

Measure program execution time

To measure execution time of any program under UNIX (Linux, Mac X, Solaris) one can use time command. For example

>time ls

>real 0m0.006s
>user 0m0.001s
>sys 0m0.004s


Command time ls measures time used by ls program.