获取系统时钟频率
[DllImport("kernel32")]
static extern bool QueryPerformanceFrequency(ref long PerformanceFrequency);
获取系统时钟计数
[DllImport("kernel32.dll ")]
static extern bool QueryPerformanceCounter(ref long lpPerformanceCount);
获取精确时间
[DllImport("kernel32.dll")] //100ns 精度
public static extern void GetSystemTimeAsFileTime(out System.Runtime.InteropServices.ComTypes.FILETIME lpSystemTimeAsFileTime);
long a = (((long)lpSystemTimeAsFileTime.dwHighDateTime) << 32) | ((uint)lpSystemTimeAsFileTime.dwLowDateTime);
其它相关参考:http://www.cnblogs.com/kex1n/p/3297607.html
http://www.cnblogs.com/sifenkesi/archive/2011/06/01/2065673.html