Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linux time command microseconds or better accuracy

Tags:

linux

time

I wish to know the amount of time taken for execution of a program under linux in microseconds (or better accuracy). Currently I am using the time command, but it gives me at the max milliseconds accuracy. Is there some way to tweak the time command to give better accuracy or is there some other command for the same?

like image 234
Pushpak Dagade Avatar asked Dec 21 '11 07:12

Pushpak Dagade


1 Answers

Your question is meaningless: you will not get repeated measurements even within milliseconds time does report.

Adding more digits will just add noise. You might as well pull the extra digits from /dev/random.

like image 117
Employed Russian Avatar answered Sep 25 '22 20:09

Employed Russian