| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1137 人关注过本帖
标题:timeGetTime
只看楼主 加入收藏
无条件为你
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-12-13
收藏
 问题点数:0 回复次数:5 
timeGetTime
#include"windows.h"
#include<stdio.h>
#include<iostream.h>
void main()
{
DWORD t1,t2;
t1=timeGetTime();
Sleep(1000);
t2=timeGetTime();
printf("begin:%n\n",t1);
printf("end:%n\n",t2);
printf("lasting:%n\n",t2-t1);
}
why it error ?can anyone help me!thank you !
搜索更多相关主题的帖子: timeGetTime 
2005-12-14 21:11
zinking
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:35
帖 子:916
专家分:0
注 册:2004-12-5
收藏
得分:0 
这是个什么程序vcc?
不行
头文件选的不对

http://kongfuziandlife. http://codeanddesign.
2005-12-14 22:45
指向指针的指针
Rank: 1
等 级:新手上路
帖 子:339
专家分:0
注 册:2004-8-8
收藏
得分:0 
大杂烩~

/sign.png" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www./sign.png');}" onmousewheel="return imgzoom(this);" alt="" />
2005-12-15 13:17
无条件为你
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-12-13
收藏
得分:0 

my teacher told us that,next week i will get the answer ,wait for me !

2005-12-15 17:44
adm_qxx
Rank: 1
等 级:新手上路
帖 子:92
专家分:0
注 册:2005-4-5
收藏
得分:0 
//这样就行了.
#include"windows.h"
#include<stdio.h>
//#include<iostream.h>
#pragma comment(lib,"winmm.lib") //连接库文件 "winmm.lib"
int main()
{
DWORD t1,t2;
t1=timeGetTime();
Sleep(1000);
t2=timeGetTime();
printf("begin:%ld\n",t1); //%ld 用长整型数输出
printf("end: %ld\n",t2);
printf("lasting:%ld\n",t2-t1);
}
//在VC 7.0下调试通过

学习是进步的基础.
2005-12-21 20:18
无条件为你
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-12-13
收藏
得分:0 

忘了来了了,谢谢楼上的各位了,在project->settings->link->Object/library modules中加上winmm.lib。可以通过两次返回的差值计算出所用的计算时间(毫秒数)。如果是中文版的就在 工程-》设置-》LINK-》option project加入winmm.lib就可以了!

2005-12-23 21:25
快速回复:timeGetTime
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012175 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved