网站介绍:一、描述通过settimeofday()函数来设置系统时间,这个函数设置的精度可以精确到微秒。#include <time.h>int settimeofday(const struct timeval *tv , const struct timezone *tz);struct timeval { time_t tv_sec; suseconds_t tv_usec; _代码里的settimeofday(&tv, null)函数,是需要root权限的
- 链接地址:https://blog.csdn.net/faihung/article/details/119326077
- 链接标题:Linux通过系统函数设置系统时间_代码里的settimeofday(&tv, null)函数,是需要root权限的_faihung的博客-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:262
- 网站标签:代码里的settimeofday(&tv null)函数 是需要root权限的