您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ timeGetDevCaps函数代码示例

51自学网 2021-06-03 08:50:20
  C++
这篇教程C++ timeGetDevCaps函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中timeGetDevCaps函数的典型用法代码示例。如果您正苦于以下问题:C++ timeGetDevCaps函数的具体用法?C++ timeGetDevCaps怎么用?C++ timeGetDevCaps使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: _StartTimer

MMRESULT _StartTimer(DWORD dwTime) {    TIMECAPS caps;    MMRESULT timerid;    timeGetDevCaps(&caps, sizeof (caps));    timeBeginPeriod(caps.wPeriodMin);    timerid = timeSetEvent(dwTime, 0, _TimerFunc, 0, (UINT) TIME_PERIODIC);    return timerid;}
开发者ID:JoshShangTsung,项目名称:HB-Shadow,代码行数:10,


示例2: OSInit

void   STDCALL OSInit(){    timeBeginPeriod(1);    TIMECAPS chi;    timeGetDevCaps(&chi, sizeof(chi));    GetSystemInfo(&si);    osVersionInfo.dwOSVersionInfoSize = sizeof(osVersionInfo);    GetVersionEx(&osVersionInfo);    if (OSGetVersion() == 8)        bWindows8 = TRUE;    QueryPerformanceFrequency(&clockFreq);    QueryPerformanceCounter(&startTime);    startTick = GetTickCount();    prevElapsedTime = 0;    PSYSTEM_LOGICAL_PROCESSOR_INFORMATION pInfo = NULL, pTemp = NULL;    DWORD dwLen = 0;    if(!GetLogicalProcessorInformation(pInfo, &dwLen))    {        if(GetLastError() == ERROR_INSUFFICIENT_BUFFER)        {            pInfo = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION)malloc(dwLen);            if(GetLogicalProcessorInformation(pInfo, &dwLen))            {                pTemp = pInfo;                DWORD dwNum = dwLen/sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);                coreCount = 0;                logicalCores = 0;                for(UINT i=0; i<dwNum; i++)                {                    if(pTemp->Relationship == RelationProcessorCore)                    {                        coreCount++;                        logicalCores += CountSetBits(pTemp->ProcessorMask);                    }                    pTemp++;                }            }            free(pInfo);        }    }    hProfilerMutex = OSCreateMutex();}
开发者ID:Eridia,项目名称:OBS,代码行数:54,


示例3: SetTimerParam

	CDuiTimerBase::CDuiTimerBase( HWND hWnd,LPARAM lParam,WPARAM wParam,int iInterval,int iTotalTimer /*= NULL*/,bool bAutoRun /*= true*/,bool bLoop /*= false*/,bool bRevers /*= false*/ )	{		SetTimerParam(hWnd,lParam,wParam,iInterval,iTotalTimer,bAutoRun,bLoop,bRevers);		TIMECAPS tc;		if(timeGetDevCaps(&tc,sizeof(TIMECAPS))==TIMERR_NOERROR)		{			m_uTimerAccuracy=min(max(tc.wPeriodMin,1),tc.wPeriodMax);			timeBeginPeriod(m_uTimerAccuracy);		}	}
开发者ID:shantj,项目名称:duilib,代码行数:11,


示例4: _StopTimer

//=============================================================================void _StopTimer(MMRESULT timerid){ TIMECAPS caps;	if (timerid != 0) {		timeKillEvent(timerid);		timerid = 0;		timeGetDevCaps(&caps, sizeof(caps));		timeEndPeriod(caps.wPeriodMin);	}}
开发者ID:X4N1,项目名称:Helbreath.HGServerConsole,代码行数:12,


示例5: init_throttle_timer

/*=============================================================================This routine intializes the system timer used for throttling the emulationspeed.=============================================================================*/int init_throttle_timer(void){#ifdef WIN32	TIMECAPS		tc;	/* Get the system's multimedia timer capabilties */	timeGetDevCaps(&tc, sizeof(tc)); 	/* On older systems, the minimum may be 55ms.  In this case, we just use 55ms as the tick */	if (tc.wPeriodMin > 50)	{		gThrottlePeriod = tc.wPeriodMin;		gThrottleTerminalCount = 1000 / gThrottlePeriod;	}	else if (tc.wPeriodMin <= 10)	{		/* We don't need 10ms of resolution.  Let's use 20ms instead */		gThrottlePeriod = 50;		/* Set TC for 50 counts = 1sec */		gThrottleTerminalCount = 20;	}	/* Setup the throttle event for signalling */	gThrottleEvent = CreateEvent(NULL, TRUE, FALSE, NULL);	InitializeCriticalSection(&gThrottleCritSect);	/* Calculate the period, Throttle Delta time and setup the timer */	gThrottleDelta = gTargetFrequency * gThrottlePeriod / 1000;	if (timeBeginPeriod(gThrottlePeriod) == TIMERR_NOCANDO)		return FALSE;	gThrottleId = timeSetEvent(gThrottlePeriod, tc.wPeriodMin, ThrottleProc, 		0, TIME_PERIODIC ); #else    /* We don't need 10ms of resolution.  Let's use 20ms instead */    gThrottlePeriod = 40;    /* Set TC for 50 counts = 1sec */    gThrottleTerminalCount = 25;    gThrottlePeriodCount = 0;	gThrottleDelta = gTargetFrequency * gThrottlePeriod / 1000;	gThrottleCycles = cycles + (gThrottleDelta << 1);    // Initialize thread processing    pthread_mutex_init(&gThrottleLock, NULL);    pthread_create(&gThrottleThread, NULL, ThrottlePeriodProc, NULL);    sem_init(&gThrottleEvent, 0, 0);#endif	return 1;}
开发者ID:ProfSteve,项目名称:virtualt,代码行数:59,


示例6: SetupMillisTimer

/*  By default in 2000/XP, the timeGetTime call is set to some resolution  between 10-15 ms query for the range of value periods and then set timer  to the lowest possible.  Note: MUST make call to corresponding  CleanupMillisTimer*/void SetupMillisTimer(void) {  TIMECAPS timeCaps;  timeGetDevCaps(&timeCaps, sizeof(TIMECAPS));   if (timeBeginPeriod(timeCaps.wPeriodMin) == TIMERR_NOCANDO) {    fprintf(stderr,"WARNING: Cannot set timer precision.  Not sure what precision we're getting!/n");  }else {    timerRes = timeCaps.wPeriodMin;    fprintf(stderr,"(* Set timer resolution to %d ms. *)/n",timeCaps.wPeriodMin);  }}
开发者ID:smallGum,项目名称:gpuocelot,代码行数:18,


示例7: main

int main(int argc,char**argv){    ARParam cparam;    ARParam wparam;    int xsize,ysize;    glutInit(&argc,argv);    if(arVideoOpen(vconf_name)<0){	puts("ビデオデバイスエラ
C++ timeGetTime函数代码示例
C++ timeEndPeriod函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。