linux time命令微秒或更佳的精度 [英] linux time command microseconds or better accuracy

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

问题描述

我想知道在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 time命令微秒或更佳的精度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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