SetPriority(m_priority);
}
+ m_state = STATE_NEW;
+
return TRUE;
}
void wxThread::Sleep(unsigned long milliseconds)
{
- clock_t start = clock() ;
- do
- {
- YieldToAnyThread() ;
- } while( clock() - start < milliseconds / CLOCKS_PER_SEC ) ;
+ clock_t start = clock();
+ do
+ {
+ YieldToAnyThread();
+ } while( clock() - start < milliseconds / 1000.0 * CLOCKS_PER_SEC ) ;
}
int wxThread::GetCPUCount()
}
}
- // if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) )
- {
- wxLogLastError("GetExitCodeThread");
-
- rc = (ExitCode)-1;
- }
-
if ( IsDetached() )
{
// if the thread exits normally, this is done in WinThreadStart, but in
delete this;
}
- // wxASSERT_MSG( (DWORD)rc != STILL_ACTIVE,
- // wxT("thread must be already terminated.") );
-
if ( pRc )
*pRc = rc;
#endif
if ( !hasThreadManager )
{
- wxMessageBox( "Error" , "Thread Support is not available on this System" , wxOK ) ;
+ wxMessageBox( wxT("Error") , wxT("Thread Support is not available on this System") , wxOK ) ;
return FALSE ;
}
#include "wx/thrimpl.cpp"
#endif // wxUSE_THREADS
-
-// vi:sts=4:sw=4:et