gpt4 book ai didi

linux - _SC_CLK_TCK 没有定义

转载 作者:太空狗 更新时间:2023-10-29 11:05:16 25 4
gpt4 key购买 nike

我正在使用嵌入式 Linux 2.6.36

我需要那个序列:

ticksPerSecond=sysconf(_SC_CLK_TCK); // ticks per sec

但是我得到了这个错误

semLib.c:96: error: '_SC_CLK_TCK' undeclared (first use in this function)
semLib.c:96: error: (Each undeclared identifier is reported only once
semLib.c:96: error: for each function it appears in.)

我没有找到

的定义

_SC_CLK_TCK

我发现它应该在 linux/time.h 中。但事实并非如此。

最佳答案

尝试 #include <unistd.h> .它包括带有此定义和其他定义的 header 。

关于linux - _SC_CLK_TCK 没有定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12475028/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com