interval.d
来自「Sun Solaris 10 中的 DTrace 组件的源代码。请参看: htt」· D 代码 · 共 29 行
D
29 行
#pragma D option quietsdt:::callout-start{ self->callout = ((callout_t *)arg0)->c_func;}fbt::timeout:entry/self->callout && arg2 <= 100/{ /* * In this case, we are most interested in interval timeout(9F)s that * are short. We therefore do a linear quantization from 0 ticks to * 100 ticks. The system clock's frequency ? set by the variable * "hz" ? defaults to 100, so 100 system clock ticks is one second. */ @callout[self->callout] = lquantize(arg2, 0, 100);}sdt:::callout-end{ self->callout = NULL;}END{ printa("%a\n%@d\n\n", @callout);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?