Quick and Dirty Stopwatch via the Mac Terminal
You can create an instant quick and dirty stopwatch via the Mac OS X (or linux) command line by launching the Terminal app and typing the following command string:
Now hit enter and the stopwatch begins.
At any point, you can stop the counting stopwatch by hitting Control-C on the keyboard, which will return to the command prompt while returning something back that looks like this:
$ time cat
The top ‘real’ number is the elapsed time, that is, time that passed since executing the command.
How this stopwatch works is that you are using the ‘time’ command to measure the time of how long another command takes to execute, but since the cat command requires something to output and we are not providing anything, cat does nothing, thus creating a simple stopwatch. Great little trick, huh?
This works in Mac OS X, Linux, and should work in just about any other version of unix that supports the time and cat commands.