Ejemplo n.º 1
0
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();
  }
}
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
// 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 );
}
Ejemplo n.º 3
0
void CMyAsyncHttp::SetInnerTaskWaitTime(unsigned timeOut)
{
	if(IsIdle())
		m_TimeOut	=timeOut;
}
Ejemplo n.º 4
0
void CMyAsyncHttp::SetRefer(char *refer)
{
	if(IsIdle())
		m_Refer=refer;
}
Ejemplo n.º 5
0
void CMyAsyncHttp::SetAcceptType(char *type)
{
	if(IsIdle())
		m_AcceptType=type;
}
Ejemplo n.º 6
0
void CMyAsyncHttp::AddHttpHeader(char *header)
{
	if(IsIdle())
		m_HttpHeader+=header;
}
Ejemplo n.º 7
0
void CMyAsyncHttp::SetUserInfo(char *userName,char *password)
{
	if(IsIdle())
		m_Password=password;
}
Ejemplo n.º 8
0
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);
}
Ejemplo n.º 10
0
const cChannel *cDynamicDevice::GetCurrentlyTunedTransponder(void) const
{
  if (!IsIdle() && subDevice)
     return subDevice->GetCurrentlyTunedTransponder();
  return cDevice::GetCurrentlyTunedTransponder();
}
Ejemplo n.º 11
0
bool
RunWhenIdleTask::StillIdle(bigtime_t currentTime)
{
    return IsIdle(currentTime, kIdleTreshold);
}
Ejemplo n.º 12
0
bool
RunWhenIdleTask::IdleTimerExpired(bigtime_t currentTime)
{
    return IsIdle(currentTime, 0);
}