当前位置: 首页>>代码示例>>C++>>正文


C++ Timer::GetElapsedTimeSeconds方法代码示例

本文整理汇总了C++中Timer::GetElapsedTimeSeconds方法的典型用法代码示例。如果您正苦于以下问题:C++ Timer::GetElapsedTimeSeconds方法的具体用法?C++ Timer::GetElapsedTimeSeconds怎么用?C++ Timer::GetElapsedTimeSeconds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Timer的用法示例。


在下文中一共展示了Timer::GetElapsedTimeSeconds方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: vdf_initall

long _cdecl vdf_initall(int numdisks, const char* cdid, long* cddrives, long* disksfound)
{
	Timer Measure;
	Measure.Start();
	if(hDLL = LoadLibrary(TEXT("Vdfs32org.dll")))
	{
		vdf_fopen_ptr = (vdf_fopen_func)GetProcAddress(hDLL, "vdf_fopen");
		vdf_fclose_ptr = (vdf_fclose_func)GetProcAddress(hDLL, "vdf_fclose");
		vdf_fread_ptr = (vdf_fread_func)GetProcAddress(hDLL, "vdf_fread");
		vdf_fseek_ptr = (vdf_fseek_func)GetProcAddress(hDLL, "vdf_fseek");
		vdf_ftell_ptr = (vdf_ftell_func)GetProcAddress(hDLL, "vdf_ftell");
		vdf_fexists_ptr = (vdf_fexists_func)GetProcAddress(hDLL, "vdf_fexists");
		vdf_getdir_ptr = (vdf_getdir_func)GetProcAddress(hDLL, "vdf_getdir");
		vdf_findopen_ptr = (vdf_findopen_func)GetProcAddress(hDLL, "vdf_findopen");
		vdf_findnext_ptr = (vdf_findnext_func)GetProcAddress(hDLL, "vdf_findnext");
		vdf_findclose_ptr = (vdf_findclose_func)GetProcAddress(hDLL, "vdf_findclose");
		vdf_searchfile_ptr = (vdf_searchfile_func)GetProcAddress(hDLL, "vdf_searchfile");
		vdf_getlasterror_ptr = (vdf_getlasterror_func)GetProcAddress(hDLL, "vdf_getlasterror");
		vdf_initall_ptr = (vdf_initall_func)GetProcAddress(hDLL, "vdf_initall");
		vdf_exitall_ptr = (vdf_exitall_func)GetProcAddress(hDLL, "vdf_exitall");
		vdf_ffilesize_ptr = (vdf_ffilesize_func)GetProcAddress(hDLL, "vdf_ffilesize");

		fopen_s(&Log, "VDFS.log", "w");

		long res = vdf_initall_ptr(numdisks, cdid, cddrives, disksfound);
		fprintf(Log, "%d vdf_initall(%d, %s, %d, %d)\n", res, numdisks, cdid, *cddrives, *disksfound);
		fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
		fflush(Log);
		return res;
	}
	return -1;
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:32,代码来源:Vdfs32.cpp

示例2: main

void main(void)
{
	Vdfs Test;
	Timer Measure;
	Measure.Start();
	Test.Init();
	printf("%f\n", Measure.GetElapsedTimeSeconds());
	_getch();
}
开发者ID:basecq,项目名称:GothicFix,代码行数:9,代码来源:PreCompiled.cpp

示例3: vdf_fclose

long _cdecl vdf_fclose(long fp) 
{
	Timer Measure;
	Measure.Start();
	long res = vdf_fclose_ptr(fp);
	fprintf(Log, "%d vdf_fclose(%d)\n", res, fp);
	fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
	fflush(Log);
	return res; 
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:10,代码来源:Vdfs32.cpp

示例4: vdf_fopen

long _cdecl vdf_fopen(const char* filename, long flags) 
{
	Timer Measure;
	Measure.Start();
	long res = vdf_fopen_ptr(filename, flags);
	fprintf(Log, "%d vdf_fopen(%s, %d)\n", res, filename, flags);
	fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
	fflush(Log);
	return res;
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:10,代码来源:Vdfs32.cpp

示例5: vdf_findnext

long _cdecl vdf_findnext(long find, TVDFFINDDATA* finddata) 
{
	Timer Measure;
	Measure.Start();
	long res = vdf_findnext_ptr(find, finddata);
	fprintf(Log, "%d vdf_findnext(%d, %s)\n", res, find, finddata->name);
	fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
	fflush(Log);
	return res;
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:10,代码来源:Vdfs32.cpp

示例6: vdf_getdir

long _cdecl vdf_getdir(char* dirname) 
{
	Timer Measure;
	Measure.Start();
	long res = vdf_getdir_ptr(dirname);
	fprintf(Log, "%d vdf_getdir_ptr(%s)\n", res, dirname);
	fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
	fflush(Log);
	return res;
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:10,代码来源:Vdfs32.cpp

示例7: vdf_getlasterror

long _cdecl vdf_getlasterror(char* text)
{
	Timer Measure;
	Measure.Start();
	long res = vdf_getlasterror_ptr(text);
	fprintf(Log, "%d vdf_getlasterror(%s)\n", res, text);
	fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
	fflush(Log);
	return res;
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:10,代码来源:Vdfs32.cpp

示例8: vdf_searchfile

long _cdecl vdf_searchfile(const char* filename, char* fullname) 
{
	Timer Measure;
	Measure.Start();
	long res = vdf_searchfile_ptr(filename, fullname);
	fprintf(Log, "%d vdf_searchfile(%s, %s)\n", res, filename, fullname);
	fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
	fflush(Log);
	return res;
};
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:10,代码来源:Vdfs32.cpp

示例9: vdf_exitall

long _cdecl vdf_exitall(void) 
{
	Timer Measure;
	Measure.Start();
	if(hDLL)
	{
		long res = vdf_exitall_ptr();
		fprintf(Log, "%d vdf_exitall()\n", res);
		fprintf(Log, "\t%f sec\n", Measure.GetElapsedTimeSeconds());
		fflush(Log);

		vdf_fopen_ptr = NULL;
		vdf_fclose_ptr = NULL;
		vdf_fread_ptr = NULL;
		vdf_fseek_ptr = NULL;
		vdf_ftell_ptr = NULL;
		vdf_fexists_ptr = NULL;
		vdf_getdir_ptr = NULL;
		vdf_findopen_ptr = NULL;
		vdf_findnext_ptr = NULL;
		vdf_findclose_ptr = NULL;
		vdf_searchfile_ptr = NULL;
		vdf_getlasterror_ptr = NULL;
		vdf_initall_ptr = NULL;
		vdf_exitall_ptr = NULL;
		vdf_ffilesize_ptr = NULL;

		FreeLibrary(hDLL);
		hDLL = NULL;

		fclose(Log);
		Log =  NULL;

		return res;
	}
	return 0;
}
开发者ID:GothicFixTeam,项目名称:GothicFix,代码行数:37,代码来源:Vdfs32.cpp


注:本文中的Timer::GetElapsedTimeSeconds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。