rt.
解决方案 »
- vc安装部署生成一个软件test.exe, 怎样使它拷贝后不能使用
- overloaded member function问题,谢谢!
- 怎样在两个对话框之间正确切换?
- 哪有免费的报表控件,要做一个带有图片的报表格式,(就像一个简历的报表)然后打印,那个GRID++ report不错,不过收费,用vc开发
- 获取网页选中的文字信息
- 如何在ListView单元中使用combobox进行编辑?
- 我在编代码时不小心按了什么键,就出现下面的符号,,请问!
- 关于DLL调用的问题
- 如何在已经存在的资源文件里添加对话框资源,用资源编辑器的?
- 偶想弹一个可以自定义的MessageBox,谁能帮偶!
- 在Win2000下怎样通过编程让任务栏实现系统中提供的自动隐藏?
- 如何使图形不覆盖???
....
DWORD d2 = GetTickCount();
d2-d1
msdn上有详细的说明
#include <stdio.h>
#include <stdlib.h>
#include <time.h>void sleep( clock_t wait );void main( void )
{
long i = 600000L;
clock_t start, finish;
double duration; /* Delay for a specified time. */
printf( "Delay for three seconds\n" );
sleep( (clock_t)3 * CLOCKS_PER_SEC );
printf( "Done!\n" ); /* Measure the duration of an event. */
printf( "Time to do %ld empty loops is ", i );
start = clock();
while( i-- )
;
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
printf( "%2.1f seconds\n", duration );
}/* Pauses for a specified number of milliseconds. */
void sleep( clock_t wait )
{
clock_t goal;
goal = wait + clock();
while( goal > clock() )
;
}