?? time.c
字號:
#include "time.h"#define DELTA (134774LL*86400)#define SCALE (10000000LL)unsigned long windows_time_to_unix_time(LARGE_INTEGER time){ /* * Windows' system time is a count of 100-nanosecond intervals since January 1, 1601. * System time is typically updated approximately every ten milliseconds. This value * is computed for the GMT time zone. */ /* * Convert to seconds. */ time.QuadPart = time.QuadPart / SCALE; /* * Shift to 1970. 134774*86400 is the number of seconds between January 1, 1601 and * January 1, 1970. */ time.QuadPart -= DELTA; return time.QuadPart;}LARGE_INTEGER unix_time_to_windows_time(unsigned long time){ LARGE_INTEGER ret_time; ret_time.QuadPart = time; ret_time.QuadPart += DELTA; ret_time.QuadPart *= SCALE; return ret_time;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -