📄 util_clockstuff.c
字号:
#ifdef HAVE_CONFIG_H#include "config.h"#endif#include "clockstuff.h"DWORD units_per_tick = 0;DOUBLE ppm_per_adjust_unit = 0.0; /* to satisfy libntp */intgettimeofday( struct timeval *tv ){ /* Use the system time (roughly synchronised to the tick, and * extrapolated using the system performance counter. */ FILETIME StartTime; ULONGLONG Time; GetSystemTimeAsFileTime(&StartTime); Time = (((ULONGLONG) StartTime.dwHighDateTime) << 32) + (ULONGLONG) StartTime.dwLowDateTime; /* Convert the hecto-nano second time to tv format */ Time -= FILETIME_1970; tv->tv_sec = (LONG) ( Time / 10000000ui64); tv->tv_usec = (LONG) (( Time % 10000000ui64) / 10); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -