mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 00:46:31 +00:00
修复jiffy时钟过快问题,启用gettimeofday测试,修改mount测试 (#680)
1. 把clock tick rate与hpet频率关联起来 2. 修复墙上时间同步错误的问题 3. 启用时间watch dog. 4. 修复时间流逝速度异常 --------- Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -8,16 +8,16 @@
|
||||
int main()
|
||||
{
|
||||
struct timeval *tv = malloc(sizeof(struct timeval));
|
||||
// struct timezone *tz = malloc(sizeof(struct timezone));
|
||||
// for (int i = 0; i < 15; i++)
|
||||
// {
|
||||
// gettimeofday(tv, NULL);
|
||||
// printf("%ld.%06ld\n", tv->tv_sec, tv->tv_usec);
|
||||
// for (int i = 0; i < 10; i++)
|
||||
// {
|
||||
// usleep(500000);
|
||||
// }
|
||||
// }
|
||||
struct timezone *tz = malloc(sizeof(struct timezone));
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
gettimeofday(tv, NULL);
|
||||
printf("%ld.%06ld\n", tv->tv_sec, tv->tv_usec);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
usleep(500000);
|
||||
}
|
||||
}
|
||||
gettimeofday(tv, NULL);
|
||||
printf("tv = %ld.%06ld\n", tv->tv_sec, tv->tv_usec);
|
||||
// printf("tz_minuteswest = %d,tz_dsttime = %d", (*tz).tz_minuteswest, (*tz).tz_dsttime);
|
||||
|
Reference in New Issue
Block a user