获取精确毫秒的时间间隔
2010-03-26 13:31
246 查看
//开始
LARGE_INTEGER iLarge;
QueryPerformanceFrequency(&iLarge);
double dbFreq = (double) iLarge.QuadPart;
QueryPerformanceCounter(&iLarge);
double dbBegin = (double) iLarge.QuadPart;
//结束部分
QueryPerformanceCounter(&iLarge);
double dbEnd = (double) iLarge.QuadPart;
int ms = (int) ((dbEnd - dbBegin) * 1000.0 / dbFreq);
CString str;str.Format(L"/nDecoding time =%d",ms);
SetWindowText(str);
LARGE_INTEGER iLarge;
QueryPerformanceFrequency(&iLarge);
double dbFreq = (double) iLarge.QuadPart;
QueryPerformanceCounter(&iLarge);
double dbBegin = (double) iLarge.QuadPart;
//结束部分
QueryPerformanceCounter(&iLarge);
double dbEnd = (double) iLarge.QuadPart;
int ms = (int) ((dbEnd - dbBegin) * 1000.0 / dbFreq);
CString str;str.Format(L"/nDecoding time =%d",ms);
SetWindowText(str);
相关文章推荐
- Linux获取系统当前时间(精确到毫秒)
- Linux获取系统当前时间(精确到毫秒)
- VC获取系统时间、程序运行时间(精确到秒,毫秒)的五种方法
- linux下获取当前时间(精确到毫秒)
- Java中获取比毫秒更为精确的时间
- C/C++获取系统时间戳,精确到毫秒
- VC获取系统时间、程序运行时间(精确到秒,毫秒)的五种方法
- 【Linux】shell: 获取时间间隔到毫秒、微秒级别
- 【Linux】shell: 获取时间间隔到毫秒、微秒级别
- VC获取系统时间、程序运行时间(精确到秒,毫秒)的五种方法
- 获取系统时间 精确到毫秒 iphone
- VC获取系统时间、程序运行时间(精确到秒,毫秒)的五种方法
- 【VS开发】VC++ 获取系统时间、程序运行时间(精确到秒,毫秒)的五种方法
- Linux获取系统当前时间(精确到毫秒)
- 【Linux】shell: 获取时间间隔到毫秒、微秒级别
- Linux 下c获取当前时间(精确到秒和毫秒或者微秒)
- VC获取系统时间、程序运行时间(精确到秒,毫秒)的五种方法
- sqlite 获取当前时间 精确到毫秒
- Linux 下c获取当前时间(精确到秒和毫秒或者微秒)
- 学习备忘--获取当前日期时间(精确到毫秒)