void CIA6526::NewDelayOrFeed() { if (IsIdle()) { if (TimerIdle.IsCounting()) { int iClocks = TimerIdle.ReadCounter(); if ((dwDelay & CountA3) != 0) { iCounterA += iClocks; } if ((dwDelay & CountB3) != 0) { iCounterB += iClocks; } TimerIdle.StopCounter(); } SetBusy(); } }
//----------------------------------------------------------------------------- // Name: ~CThreadedLevelLoader() // Desc: Destructor //----------------------------------------------------------------------------- CThreadedLevelLoader::~CThreadedLevelLoader() { Dbg_Assert( IsIdle() ); // Kill the thread. // signal thread m_bKillThread = TRUE; SetEvent( m_hEvent ); // wait for thread to exit DWORD dwExitStatus; do { SwitchToThread(); // try to get the thread to execute GetExitCodeThread( m_hThread, &dwExitStatus ); } while( dwExitStatus == STILL_ACTIVE ); // close handle to thread and event CloseHandle( m_hThread ); CloseHandle( m_hEvent ); }
void CMyAsyncHttp::SetInnerTaskWaitTime(unsigned timeOut) { if(IsIdle()) m_TimeOut =timeOut; }
void CMyAsyncHttp::SetRefer(char *refer) { if(IsIdle()) m_Refer=refer; }
void CMyAsyncHttp::SetAcceptType(char *type) { if(IsIdle()) m_AcceptType=type; }
void CMyAsyncHttp::AddHttpHeader(char *header) { if(IsIdle()) m_HttpHeader+=header; }
void CMyAsyncHttp::SetUserInfo(char *userName,char *password) { if(IsIdle()) m_Password=password; }
bool Performance::IsIdle() { return IsIdle(USER_IDLE_ELAPSED_TIME); }
bool cDynamicDevice::IsTunedToTransponder(const cChannel *Channel) const { if (!IsIdle() && subDevice) return subDevice->IsTunedToTransponder(Channel); return cDevice::IsTunedToTransponder(Channel); }
const cChannel *cDynamicDevice::GetCurrentlyTunedTransponder(void) const { if (!IsIdle() && subDevice) return subDevice->GetCurrentlyTunedTransponder(); return cDevice::GetCurrentlyTunedTransponder(); }
bool RunWhenIdleTask::StillIdle(bigtime_t currentTime) { return IsIdle(currentTime, kIdleTreshold); }
bool RunWhenIdleTask::IdleTimerExpired(bigtime_t currentTime) { return IsIdle(currentTime, 0); }