腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(2042)
视频
沙龙
1
回答
简单继承--奇怪的编译器错误
、
、
#include <sys/stat.h>struct
Timespec
: public
timespec
{ tv_nsec = ns; static const
Timespec
max; const
Timespec
浏览 1
提问于2015-09-18
得票数 3
回答已采纳
2
回答
在time.h中解析
timespec
的重定义
、
、
usr/include/linux/time.h又包含/usr/include/stdlib.h.的程序stdlib.h包括/usr/include/time.h,它定义了'struct
timespec
我已经检查了这两个头文件中'struct
timespec
'的定义:struct
timespec
__time_t t
浏览 5
提问于2013-12-24
得票数 2
回答已采纳
3
回答
错误:重新定义“struct”
、
、
> echoClient.c Client.cint nanosleep(const struct
timespec
*req, struct
timespec
*rem); int len = 0
浏览 6
提问于2015-09-23
得票数 0
回答已采纳
1
回答
Timespec
重定义错误
、
、
、
、
在使用Visual 2015在C中执行P线程程序时,我得到了以下错误:以下是我的代码:{ printf("x=%d", x);pthread.h头文件包含以下与
timespec
defined(HAVE_STRUCT_
TIMESPEC</
浏览 3
提问于2015-11-06
得票数 22
1
回答
获取内核模块中的当前时间(秒)
、
、
、
在内核模块中获取当前时间(从纪元开始)的标准方法是什么?这不是复制品。我已经看过之前关于SO的问题了。其中许多问题的答案要么没有指定使用的函数,要么错误地引用了内核中不允许的time.h
浏览 0
提问于2012-11-25
得票数 14
回答已采纳
5
回答
是什么导致了这段C代码中的分段错误?
、
、
./ test.c -static -lrt#include <sys/time.h>#include <stdio.h> {//cout<<d
浏览 0
提问于2010-01-27
得票数 3
1
回答
获得绝对时间的更好方法?
、
、
、
、
我知道我需要将timeval从gettimeofday添加到
timespec
中,然后添加任意数量的时间。struct
timespec
ts;gettimeofday(&now, nullptr); void timeval_to_
timespec
(struct timeval* tv, struct
timespec
*
浏览 7
提问于2015-02-16
得票数 1
回答已采纳
1
回答
将time_t与struct (在C中)进行比较
、
、
、
、
我有多个struct值和一个time_t值。我想看看哪个struct值最接近于time_t值。我应该只是比较秒和忽略纳秒吗?或者,从那个时代开始,我应该将两者转换为总纳秒吗?或者可以将两者转换为自时代以来的总纳秒,为time_t增加半秒?我只需将每个结
浏览 6
提问于2021-02-04
得票数 2
回答已采纳
1
回答
为什么在C中创建睡眠时间时,clock_nanosleep比纳米睡眠更受欢迎?
、
、
、
这两个函数中哪一个更好int clock_nanosleep(clockid_t clock_id, int flags, const struct
timespec
*rqtp, struct
timespec
*rmtp);#include <time.h> int nanosleep(const struct
timespec
*rqtp, struct
timespec
*rmtp);
浏览 6
提问于2011-10-17
得票数 13
回答已采纳
1
回答
C++ -在后台POSIX线程上具有固定增量时间的循环
、
、
、
、
目标是以固定的增量时间在后台线程上调用函数。简单但可能不是最好的解决方案是运行一个while(真的)-loop,让线程休眠,直到下次应该调用函数为止。下面是半个C++ /半个伪代码的实现方法。void loopFunction() while(true) auto currentTime = getTime(); aut
浏览 0
提问于2016-03-10
得票数 2
1
回答
POSIX问题与明明威(sem_timedwait)
、
、
、
代码示例:int rc = 0;
timeSpec
.tv_nsec = 0; CC= x86_64-w64-mingw32-gcc
浏览 1
提问于2015-05-21
得票数 1
2
回答
在struct中,tv_sec和tv_nsec以秒和纳米秒表示相同的时间,还是它们必须是获得时间的总和?
、
、
double
timespec
_delta2milliseconds(struct
timespec
*last, struct
timespec
*previous) return (
浏览 20
提问于2022-11-11
得票数 0
回答已采纳
1
回答
你如何在一个时间点结构中表示-1纳秒?
、
、
、
timespec
结构被定义为: time_t tv_sec; /* seconds */
timespec
now{ 1'629'659'718, 564'223'121 };
timespec
nulltime
timespec</
浏览 3
提问于2021-08-22
得票数 0
回答已采纳
1
回答
C: struct
timespec
c库
、
我正在尝试编写一个较小的库,使我能够度量使用struct
timespec
时测量的平均时间。因为C不允许操作符重载,所以我不得不构建函数。get_
timespec
_diff(const struct
timespec
t1, const struct
timespec
t2) struct
timespec
t;
timespec
_add(const struct
timespec
t1, const struct
timespec
t2)
浏览 0
提问于2020-11-27
得票数 3
3
回答
读取纳米秒值的数据类型是什么?
、
、
例子:getrawmonotonic(&ts);end_time的数据类型是什么??
浏览 3
提问于2014-05-12
得票数 0
回答已采纳
1
回答
分析回调到Python中的C扩展
、
、
、
假设出于这个讨论的目的,我有一个这样的函数: PyObject* ttype = PyTuple_GetItem(factory, 1); PyObject* key; Py_ssize_t pos = 0; Py_ssize_t arg_len = 0
浏览 0
提问于2018-05-28
得票数 2
1
回答
如何在gtk的按钮信号中添加计时器?
、
、
、
所以我正在用glade设计一个虚拟的数字键盘。它现在可以工作了,但我想让按钮以t9的方式打印字母,但我不知道如何计时……请帮帮忙。到目前为止我的代码是: #include <string.h> { GtkWidget *window;
浏览 0
提问于2017-06-28
得票数 0
1
回答
在linux/time.h中缺少do_posix_clock_monotonic_gettime
、
timespec
_add_safe(const struct
timespec
lhs, struct
timespec
rhs
timespec
_sub(struct
ti
浏览 0
提问于2016-09-12
得票数 3
回答已采纳
2
回答
在哪里可以找到
timespec
_get的源代码?
、
、
、
、
如果我在cp首选项上或在我的计算机上运行示例代码,它可以工作:#include <time.h> {
timespec
_get(&ts, TIME_UTC); strftime(buff, sizeof buff, "%D %T", gmtime(struct
timespec
*ts, int base) s
浏览 2
提问于2018-07-24
得票数 2
回答已采纳
1
回答
C内核--如何使用
timespec
_to_ns()?
、
、
我需要给出const struct
timespec
*的论点,但是start_time是struct
timespec
类型的。(*kinfo).start_time =
timespec
_to_ns((*current).start_time);
浏览 5
提问于2015-09-17
得票数 2
回答已采纳
点击加载更多
相关
资讯
Linux系统编程 条件变量
Xilinx FPGA编程技巧之常用时序约束详解
Linux系统编程 信号量
高级IO模型之kqueue和epoll
面试多线程同步,你必须要思考的问题
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券