tb:上面给出的纳秒计算的实现。
TB: The implementation of nanosecond calculation presented above.
技术时间(单位:纳秒)。
纳秒级:10至20秒。
将从纪元开始的xseconds(3)转换成纳秒。
Convert the value of xseconds since the epoch (3) to nanoseconds.
使用gettimeofday,纳秒计算的实现如下
Using gettimeofday, the implementation of a nanosecond calculation is as follows
日志必须包含时间戳,其中含有时区,精确到毫秒或纳秒。
Logs must contain timestamps, with timezone, to the millisecond or nanosecond.
使用 C 编写的以纳秒精度计算时间的完整算法如下所示
The full algorithm in C that computes the time with nanosecond precision is as follows
而这一“时间空洞”只在极短的时间中存在——大约110纳秒。
Now, this "hole in time" was only created for the briefest of instants - about 110 nanoseconds.
引入了一个叫做ndelay的新的延迟函数,允许纳秒级的等待。
A new delay function called ndelay has been introduced, which allows waits for nanoseconds.
而访问已经位于内存中的数据只需要几十纳秒(或者说109秒)。
Data already in memory can be accessed in tens of nanoseconds (or 10-9 seconds).
随着中微子束的收紧,中微子仍然比光提早了60纳秒抵达了格兰·萨索。
With the beam tightened up, the neutrinos still arrived at Gran Sasso 60 nanoseconds faster than light would have.
一纳秒就是10的9次方分之一秒,而这个电脑一秒可以做2G次运算。
运行CPU时间:这是线程在执行期间消耗的CPU时间,以纳秒为单位。
Elapsed CPU time: This is the CPU time consumed by the thread during execution, in nanoseconds.
通常,它仅会对每个被测量方法带来1700- 2500纳秒的影响。
Generally, you will incur 1700-2500 nanoseconds for each method being profiled.
仅仅因为不这样做的话,当其更新后显示新的结构会有几百纳秒的延迟吗?
Just in case it changes and you need to show the new structure seven nanoseconds later?
这种使用TimeBase寄存器来实现纳秒级精度计算有两个优点
There are two advantages to the implementation of nanosecond calculation using the Time Base register
这种新的激光器是产生长约1纳秒的暗脉冲,而不是光亮的脉冲。
Instead of the occasional light pulse, this new laser has the occasional dark pulse, which lasts about one nanosecond.
尽管计时器在jiffies粒度上运行,hrtimers在纳秒粒度上运行。
Although timers operate on the granularity of jiffies, hrtimers operate at the granularity of nanoseconds.
在执行时间上减少约75%,即现在用130纳秒,从前用400纳秒。
This is almost a 75% reduction in execution time: 120 ns versus 400 ns.
最后,值得一提的一件有趣的事情是一个64位的纳秒值可以表示大约585年的时间。
Finally, it is interesting to mention that a 64-bit nanosecond value can represent approximately 585 years of elapsed time.
例如,在图3中,可以看到访问TreeMap中一个元素所用的时间是80纳秒多一点。
For example, from Figure 3, you can see that the time to access a single element from a TreeMap is a little more than 80 nanoseconds.
仅一纳秒之内,RupertMurdoch就成了这个互联网上最聪明的人。
For a nanosecond Rupert Murdoch seemed like the smartest guy on the Internet.
但在实际上,要测量这些时间和距离,达到所需要的检测到纳秒级别差异的准确度,绝非易事。
But actually measuring those times and distances to the accuracy needed to detect nanosecond differences is no easy task.
他计划使用直流电场技术,结合飞秒与纳秒激光工艺,对它们的光学与结构特性进行纳米设计。
He plans to nanoengineer their optical and structural properties using DC electric-field techniques, coupled with femtosecond and nanosecond laser processing.
但是更重要的是,每次调用后,它返回不同的时间值,看起来粒度为1000纳秒(或者1毫秒)。
But more important, it returns a different time value each time it's called, with apparent granularity of 1000 nanoseconds (or 1 microsecond).
他们记录到的中微子的行驶时间要比光线行驶相同距离提早了60纳秒,从而使整个世界为之震惊。
To the astonishment of the entire world, the neutrinos clocked in 60 nanoseconds sooner than a light beam traveling the same distance would have done.
在这个交易速度已从毫秒到微秒再提升至纳秒的今天,每个人都学会了更迅速地采取行动。
As trading moves from milliseconds to microseconds to nanoseconds, everyone is learning to act more quickly.
即使当今的大多数系统无法提供纳秒精度的时间,但是实际值应当至少比用老的方法获得的要好得多。
Even though most of today's systems will not provide times with nanosecond resolution, the actual values should at least be much better than can be obtained with the older method.
引入了重要的sysctls来在运行时对调度程序进行调优(以ns结尾的名称以纳秒为单位)。
The important sysctls introduced to tune the scheduler at runtime are (names ending in ns are in units of nanoseconds).
这种由磁场激发的转换响应速度非常快,大约100纳秒,与将信息存储于内存条上所需的时间相当。
This transfer, triggered by magnetic fields, is fast — about 100 nanoseconds, comparable to how long it takes to store information on a stick of RAM.
应用推荐