Is there high precision (millisecond) CLI stop watch in Ubuntu?
|
show 2 more comments
feedback
|
|
If you want to program it in C, then you want to be looking at the gettimeofday(2) function. This returns a structure which contains a time_t (accurate to the nearest second), and a tv_usec (accurate to the nearest microsecond). By doing two of these, and appropriate math, you can get the interval. Note that even though the systemcall returns microseconds, you can't get an interval that small. The actual resolution can be seen in /proc/timer_list. Of course, a programing question would be better on stackoverflow. | |||||
feedback
|
sudo aptitude install stopwatch– Josh K Jul 14 '10 at 2:13apt-cache show stopwatchwill list the latest version from each repository in which it's available. Or just repeat the steps you did above and write down the choices it dutifully informs you of. – Roger Pate Jul 14 '10 at 18:49