这篇教程C++ timeKillEvent函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中timeKillEvent函数的典型用法代码示例。如果您正苦于以下问题:C++ timeKillEvent函数的具体用法?C++ timeKillEvent怎么用?C++ timeKillEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了timeKillEvent函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: setitimerPHPAPI int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue){ int timeout = value->it_value.tv_sec * 1000 + value->it_value.tv_usec; int repeat = TIME_ONESHOT; /*make sure the message queue is initialized */ PeekMessage(phpmsg, NULL, WM_USER, WM_USER, PM_NOREMOVE); if (timeout > 0) { struct timer_msg *msg = malloc(sizeof(struct timer_msg)); msg->threadid = GetCurrentThreadId(); if (!ovalue) { repeat = TIME_PERIODIC; } switch (which) { case ITIMER_REAL: msg->signal = SIGALRM; realtimer = timeSetEvent(timeout, 100, (LPTIMECALLBACK) setitimer_timeout, (UINT) msg, repeat); break; case ITIMER_VIRT: msg->signal = SIGVTALRM; virttimer = timeSetEvent(timeout, 100, (LPTIMECALLBACK) setitimer_timeout, (UINT) msg, repeat); break; case ITIMER_PROF: msg->signal = SIGPROF; proftimer = timeSetEvent(timeout, 100, (LPTIMECALLBACK) setitimer_timeout, (UINT) msg, repeat); break; default: errno = EINVAL; return -1; break; } } else { switch (which) { case ITIMER_REAL: timeKillEvent(realtimer); break; case ITIMER_VIRT: timeKillEvent(virttimer); break; case ITIMER_PROF: timeKillEvent(proftimer); break; default: errno = EINVAL; return -1; break; } } return 0;}
开发者ID:AzerTyQsdF,项目名称:osx,代码行数:52,
示例2: mm_rearm_timerstatic void mm_rearm_timer(struct qemu_alarm_timer *t, int64_t delta){ int64_t nearest_delta_ms = delta / 1000000; if (nearest_delta_ms < 1) { nearest_delta_ms = 1; } /* UINT_MAX can be 32 bit */ if (nearest_delta_ms > UINT_MAX) { nearest_delta_ms = UINT_MAX; } timeKillEvent(mm_timer); mm_timer = timeSetEvent((unsigned int) nearest_delta_ms, mm_period, mm_alarm_handler, (DWORD_PTR)t, TIME_ONESHOT | TIME_CALLBACK_FUNCTION); if (!mm_timer) { fprintf(stderr, "Failed to re-arm win32 alarm timer %ld/n", GetLastError()); timeEndPeriod(mm_period); exit(1); }}
开发者ID:Jeongseob,项目名称:xen-coboost-sched,代码行数:26,
示例3: audio_timer_callback/** * Timer callback used to check about end of media (except JTS type) */static void CALLBACK audio_timer_callback(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2) { audio_handle* pHandle = (audio_handle*)dwUser; if (pHandle->hWnd) { if (-1 == pHandle->duration) { pHandle->duration = MCIWndGetLength(pHandle->hWnd); JAVA_DEBUG_PRINT1("[jc_media] audio_timer_callback %d/n", pHandle->duration); } pHandle->offset = MCIWndGetPosition(pHandle->hWnd); pHandle->curTime = pHandle->offset; /* Is end of media reached? */ if (pHandle->offset >= pHandle->duration) { /* Post EOM event to Java and kill player timer */ pHandle->timerId = 0; pHandle->offset = 0; timeKillEvent(uID); JAVA_DEBUG_PRINT1("[jc_media] javanotify_on_media_notification %d/n", pHandle->playerId); javanotify_on_media_notification(JAVACALL_EVENT_MEDIA_END_OF_MEDIA, pHandle->playerId, (void*)pHandle->duration); } }}
开发者ID:sfsy1989,项目名称:j2me,代码行数:34,
示例4: mpx_shutdown_itimerstatic voidmpx_shutdown_itimer( void ){ if ( timeKillEvent( mpxTimerID ) != TIMERR_NOERROR ) { MPXDBG( "setitimer(MPX_ITIMER) in mpx_shutdown_itimer" ); }}
开发者ID:multics69,项目名称:danbi,代码行数:7,
示例5: destroy_timer_eventint destroy_timer_event ( int timer_id ){ int count, found; found = FALSE; for ( count = 0; ( ( count < number_of_timers ) && ( !found ) ); count++ ) { if ( ( timer_list[count].used ) && ( timer_list[count].id ) ) { found = TRUE; } } if ( found ) {#ifdef _WIN32 timeKillEvent ( timer_list[count].id );#endif timer_list[count].used = FALSE; return ( TRUE ); } else { return ( FALSE ); }}
开发者ID:DexterWard,项目名称:comanche,代码行数:34,
示例6: LOG_TRACEELTE_VOID CTimer::SetTimer(ELTE_UINT32 tick){ LOG_TRACE(); if(m_uTimerID) { timeKillEvent(m_uTimerID); m_uTimerID = 0; } if(0 == tick) { //默认200ms发送数据 tick = 200; } TIMECAPS timecaps; ELTE_UINT32 TimerAccuracy = Accuracy; //从系统获得关于定时器服务能力的信息, //分辨率不能超出系统许可值(1到16毫秒) if (timeGetDevCaps(&timecaps,sizeof(TIMECAPS))==TIMERR_NOERROR) TimerAccuracy = min(max(timecaps.wPeriodMin,Accuracy),timecaps.wPeriodMax); timeBeginPeriod(TimerAccuracy); m_uDelayTime = tick; m_uTimerID = timeSetEvent(m_uDelayTime, TimerAccuracy, TimeProc, (DWORD_PTR)this, TIME_PERIODIC); LOG_RUN_DEBUG("TimerId is %d.", m_uTimerID); timeEndPeriod(TimerAccuracy); }
开发者ID:eSDK,项目名称:esdk_elte,代码行数:30,
示例7: timing_timeSetEventVOID timing_timeSetEvent(UINT delayInSeconds){ // Some vars UINT uResolution; TIMECAPS tc; MMRESULT idEvent; // We can obtain this minimum value by calling timeGetDevCaps(&tc, sizeof(TIMECAPS)); uResolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax); // Create the timer idEvent = timeSetEvent( delayInSeconds, uResolution, TimerFunction, 0, TIME_ONESHOT); while (!bProcessed){ // wait until uor function finish } // destroy the timer timeKillEvent(idEvent); // reset the timer timeEndPeriod(uResolution);}
开发者ID:LordNoteworthy,项目名称:al-khaser,代码行数:30,
示例8: timeKillEventvoid COptionsAbout::OnDestroy() { CDialog::OnDestroy(); timeKillEvent( mmTimer ); //KillTimer( TIMER_ABOUT );}
开发者ID:adamjoniec,项目名称:theimp,代码行数:7,
示例9: DSOUND_timervoid CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2){ DirectSoundDevice * device = (DirectSoundDevice*)dwUser; DWORD start_time = GetTickCount(); DWORD end_time; TRACE("(%d,%d,0x%lx,0x%lx,0x%lx)/n",timerID,msg,dwUser,dw1,dw2); TRACE("entering at %d/n", start_time); if (DSOUND_renderer[device->drvdesc.dnDevNode] != device) { ERR("dsound died without killing us?/n"); timeKillEvent(timerID); timeEndPeriod(DS_TIME_RES); return; } RtlAcquireResourceShared(&(device->buffer_list_lock), TRUE); if (device->ref) DSOUND_PerformMix(device); RtlReleaseResource(&(device->buffer_list_lock)); end_time = GetTickCount(); TRACE("completed processing at %d, duration = %d/n", end_time, end_time - start_time);}
开发者ID:dvdhoo,项目名称:wine,代码行数:26,
示例10: DirectSoundCaptureDevice_Releasestatic ULONG DirectSoundCaptureDevice_Release( DirectSoundCaptureDevice * device){ ULONG ref = InterlockedDecrement(&(device->ref)); TRACE("(%p) ref was %d/n", device, ref + 1); if (!ref) { TRACE("deleting object/n"); timeKillEvent(device->timerID); timeEndPeriod(DS_TIME_RES); EnterCriticalSection(&DSOUND_capturers_lock); list_remove(&device->entry); LeaveCriticalSection(&DSOUND_capturers_lock); if (device->capture_buffer) IDirectSoundCaptureBufferImpl_Release(&device->capture_buffer->IDirectSoundCaptureBuffer8_iface); if(device->mmdevice) IMMDevice_Release(device->mmdevice); HeapFree(GetProcessHeap(), 0, device->pwfx); device->lock.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &(device->lock) ); HeapFree(GetProcessHeap(), 0, device); TRACE("(%p) released/n", device); } return ref;}
开发者ID:evelikov,项目名称:wine,代码行数:29,
示例11: CloseHandleHRESULT CLHTMLActiveDocument::StopPlay(){#if 0 if (m_dsBuffer8) { m_dsBuffer8->Stop(); //m_dsBuffer8.Release(); } if (m_hEvent) { CloseHandle(m_hEvent); m_hEvent = NULL; }#endif if (m_nTimerID) { timeKillEvent(m_nTimerID); m_nTimerID = 0; } if (m_hThread) { ::PostThreadMessage(m_threadID, WM_QUIT, 0, 0); ::WaitForSingleObject(m_hThread, INFINITE); m_hThread = NULL; m_threadID = 0; } return S_OK;}
开发者ID:sigurdle,项目名称:FirstProject2,代码行数:32,
示例12: timeKillEvent/* ------------------------------------------------------------------------------------ */int StreamingAudio::Delete(){ if(ogg) { if(Ogg == NULL) return RGF_FAILURE; Ogg->Stop(); delete Ogg; Ogg = NULL; return RGF_SUCCESS; } timeKillEvent(m_nTimerID); // Kill timer if(mp3) { if(Mpeg3 == NULL) return RGF_FAILURE; Mpeg3->StopMp3(); delete Mpeg3; Mpeg3 = NULL; return RGF_SUCCESS; } // Check for stream availability if(m_pStream == NULL) return RGF_FAILURE; // No stream Stop(); // Stop playback return RGF_SUCCESS;}
开发者ID:RealityFactory,项目名称:RealityFactory,代码行数:35,
示例13: timeKillEventint timer::stop(){ if (control.stop) timeKillEvent(control.stop); control.stop = 0; return 0;};
开发者ID:Eih3,项目名称:v0.83,代码行数:7,
示例14: tranquilizarvoid tranquilizar() {#ifdef __WIN32__ timeKillEvent(wintimer);#else alarm(0);#endif}
开发者ID:sebasalazar,项目名称:C,代码行数:7,
示例15: win32_rearm_timerstatic void win32_rearm_timer(struct qemu_alarm_timer *t){ struct qemu_alarm_win32 *data = t->priv; assert(alarm_has_dynticks(t)); if (!active_timers[QEMU_CLOCK_REALTIME] && !active_timers[QEMU_CLOCK_VIRTUAL] && !active_timers[QEMU_CLOCK_HOST]) return; timeKillEvent(data->timerId); data->timerId = timeSetEvent(1, data->period, host_alarm_handler, (DWORD)t, TIME_ONESHOT | TIME_CALLBACK_FUNCTION); if (!data->timerId) { fprintf(stderr, "Failed to re-arm win32 alarm timer %ld/n", GetLastError()); timeEndPeriod(data->period); exit(1); }}
开发者ID:stefanneumann,项目名称:marss,代码行数:26,
示例16: TimeProcvoid PASCAL TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2){ sprintf(str, "%s", "res//"); if (c > 5472) { timeKillEvent(wTimerID); } if (c / 10 == 0) sprintf(buff, "B000%d.BMP", c); else if (c / 100 == 0) sprintf(buff, "B00%d.BMP", c); else if (c / 1000 == 0) sprintf(buff, "B0%d.BMP", c); else { sprintf(buff, "B%d.BMP", c); } str1 = str; str1 += buff; temp = c%25; if (temp == 0) count++; if (count == 10)count = 0; DrawImg(str1,count); c++;}
开发者ID:tiancai110a,项目名称:badapple,代码行数:27,
示例17: timeKillEvent// Destructorvoid Timer::destructor(void){ if (m_nIDTimer) { timeKillEvent (m_nIDTimer); m_nIDTimer = NULL; }}
开发者ID:NonCreature0714,项目名称:freespace2,代码行数:8,
示例18: win32_stop_timerstatic void win32_stop_timer(struct qemu_alarm_timer *t){ struct qemu_alarm_win32 *data = t->priv; timeKillEvent(data->timerId); timeEndPeriod(data->period);}
开发者ID:stefanneumann,项目名称:marss,代码行数:7,
示例19: Stopbool CDirectSoundPlayer::Stop(){ HRESULT hr; if(m_InitOK && m_AudioEnabled) { if(m_TimerID!=NULL) timeKillEvent(m_TimerID); hr=m_BufferSecondary->Stop(); if(hr!=DS_OK) { CString message ("CDirectSoundPlayer::Stop - Error: /n"); message += DXAppErrorToString (hr); gError->Warning(message); } hr=m_BufferSecondary->SetCurrentPosition(0); if(hr!=DS_OK) { CString message ("CDirectSoundPlayer::Stop - Error: /n"); message += DXAppErrorToString (hr); gError->Warning(message); }// dbg.Close(); } m_AudioEnabled=FALSE; return m_AudioEnabled;}
开发者ID:alexthissen,项目名称:handy-fork,代码行数:26,
示例20: SDL_SYS_TimerQuitvoid SDL_SYS_TimerQuit(void){ if ( timerID ) { timeKillEvent(timerID); } timeEndPeriod(TIMER_RESOLUTION);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,
示例21: mm_rearm_timerstatic void mm_rearm_timer(struct qemu_alarm_timer *t){ int nearest_delta_ms; assert(alarm_has_dynticks(t)); if (!active_timers[QEMU_CLOCK_REALTIME] && !active_timers[QEMU_CLOCK_VIRTUAL] && !active_timers[QEMU_CLOCK_HOST]) { return; } timeKillEvent(mm_timer); nearest_delta_ms = (qemu_next_alarm_deadline() + 999999) / 1000000; if (nearest_delta_ms < 1) { nearest_delta_ms = 1; } mm_timer = timeSetEvent(nearest_delta_ms, mm_period, mm_alarm_handler, (DWORD_PTR)t, TIME_ONESHOT | TIME_CALLBACK_FUNCTION); if (!mm_timer) { fprintf(stderr, "Failed to re-arm win32 alarm timer %ld/n", GetLastError()); timeEndPeriod(mm_period); exit(1); }}
开发者ID:16aug,项目名称:nvmeqemu,代码行数:31,
示例22: timeKillEvent void Timer::Stop() { if (mTimerID) { timeKillEvent(mTimerID); mTimerID = 0; } }
开发者ID:metsfan,项目名称:challenge-engine,代码行数:7,
示例23: EnterCriticalSectionvoid SysTimer::cancel(){ EnterCriticalSection(&Win32::win32Section); if (data->timerId != NULL) timeKillEvent(data->timerId); data->timerId = NULL; LeaveCriticalSection(&Win32::win32Section);}
开发者ID:dimdimdimdim,项目名称:geenie-firmware,代码行数:8,
示例24: timeKillEvent void CDuiTimerBase::InnerKillTimer() { timeKillEvent(m_uTimerID); timeEndPeriod(m_uTimerAccuracy); m_uTimerID = NULL; m_uTimerAccuracy = NULL; m_iCurTimer = m_iInterval; }
开发者ID:shantj,项目名称:duilib,代码行数:9,
示例25: KillMMTimervoid KillMMTimer(UINT nID){ if(nID!=0) { timeKillEvent(nID); timeEndPeriod(g_iAccuracy); } g_iMMTimerID=0;}
开发者ID:BGCX261,项目名称:zhongtong-winding-control-svn-to-git,代码行数:9,
示例26: StopKeyerDttSP_EXP voidStopKeyer (){ EnterCriticalSection(update_ok); if (timerid) timeKillEvent ((UINT) timerid); LeaveCriticalSection(update_ok); timerid = 0;}
开发者ID:Excalibur201010,项目名称:powersdr-iq,代码行数:9,
示例27: timeKillEventvoid VirtualOHT::DestoryTimer(void){ if (m_nTimerID > 0) { timeKillEvent(m_nTimerID); timeEndPeriod(1); m_nTimerID = 0; }}
开发者ID:marylucey97,项目名称:SyAutoH,代码行数:9,
示例28: _StopTimervoid _StopTimer(MMRESULT timerid){TIMECAPS caps; if (timerid != 0) { timeKillEvent(timerid); timerid = 0; timeGetDevCaps(&caps, sizeof(caps)); timeEndPeriod(caps.wPeriodMin); }}
开发者ID:Nicopla880,项目名称:Helbreath-Dragon,代码行数:9,
注:本文中的timeKillEvent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ timeSetEvent函数代码示例 C++ timeGetTime函数代码示例 |