linux下能得到系统时间精确到毫秒的函数或结构是什么?

zhusunme 2004-08-11 02:35:52
如题
...全文
778 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhusunme 2004-08-11
  • 打赏
  • 举报
回复
多谢
pacman2000 2004-08-11
  • 打赏
  • 举报
回复
来晚了。
tibet 2004-08-11
  • 打赏
  • 举报
回复
楼上的说的正确
gettext 2004-08-11
  • 打赏
  • 举报
回复
#man gettimeofday

NAME
gettimeofday, settimeofday - get / set time

SYNOPSIS
#include <sys/time.h>

int gettimeofday(struct timeval *tv, struct timezone *tz);
int settimeofday(const struct timeval *tv , const struct timezone *tz);

DESCRIPTION
gettimeofday and settimeofday can set the time as well as a timezone. tv is a
timeval struct, as specified in /usr/include/sys/time.h:

struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧