的sysconf(_SC_CLK_TCK)这是什么回报? [英] sysconf(_SC_CLK_TCK) what does it return?

查看:1624
本文介绍了的sysconf(_SC_CLK_TCK)这是什么回报?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是想了解各种的sysconf macros.I有如下编写的程序。

I was trying to understand various sysconf macros.I have written a program as below.

int main()
{
    fprintf(stdout, "No. of clock ticks per sec : %ld\n",sysconf(_SC_CLK_TCK));
    return 0;
}

我总是得到的结果100.I我是主频为2.93GHz.What一个CPU上运行它数100恰恰意味着?

I always get the result as 100.I am running it on a CPU that is clocked at 2.93GHz.What does the number 100 exactly mean.?

推荐答案

这只是每秒滴答的时钟数,你的情况在内核配置为每秒(或100Hz的时钟)。

It's just the number of clock ticks per second, in your case the kernel is configured for 100 clocks per second (or 100Hz clock).

这篇关于的sysconf(_SC_CLK_TCK)这是什么回报?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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