Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > C/C++ > windows系统中得到精确到微妙的时间
【标  题】:windows系统中得到精确到微妙的时间
【关键字】:windows
【来  源】:http://blog.chinaunix.net/article.php?articleId=19841&blogId=5847

windows系统中得到精确到微妙的时间

Your Ad Here windows系统中得到精确到微妙的时间

  

#include <windows.h>
#include <iostream>

  LARGE_INTEGER t1,t2,feq; 
  QueryPerformanceFrequency(&feq);//每秒跳动次数
  QueryPerformanceCounter(&t1);//测前跳动次数 
  for(int i = 0;i<10000;i++);
  QueryPerformanceCounter(&t2);//测后跳动次数
  double d=((double)t2.QuadPart-(double)t1.QuadPart)/((double)feq.QuadPart);//时间差秒
  std::cout<<d<<std::endl;

C/C++计时:【上一篇】
第一个windows作品:【下一篇】
【相关文章】
  • QT Windows developing enviroment Building
  • Writing Scalable Applications for Windows NT
  • 在 MS Windows 下執行 Miniwin
  • 删除Linux后找回Windows的启动菜单
  • windows对话框程序模板。
  • Windows SDK入门浅谈
  • Windows 环境下apache+mod_perl+activeperl安装运行说明
  • cedega <<--可以运行windows下面程序的好东东
  • Windows 2000 DataCenter Server,需要的给个上传地址。
  • windows server 2003中的几个新命令行工具
  • 【随机文章】
  • 校园网网络设计及分析
  • Sort your mail with Sieve under Cyrus
  • ISA专题教程
  • 图像处理:Photoshop7.0人像抠图实战
  • Questions:连接两个表进行查询:可以输入或不输入查询条件的sql 语句
  • 一种“您无权查看该网页”的原因和解决方法
  • editing
  • 保护(IIS)web服务器的15个技巧
  • Lotus Notes常见问题答疑
  • 物理卷分配权限的修改
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.