linux时间命令微秒或更准确 [英] linux time command microseconds or better accuracy

查看:17
本文介绍了linux时间命令微秒或更准确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在 linux 下执行程序所花费的时间,以微秒为单位(或更准确).目前我正在使用 time 命令,但它给了我最大的毫秒精度.是否有某种方法可以调整 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?

推荐答案

你的问题毫无意义:即使在毫秒时间内报告,你也不会得到重复测量.

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

添加更多数字只会增加噪音.您不妨从 /dev/random 中提取额外的数字.

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

这篇关于linux时间命令微秒或更准确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆