// wait or sleep this thread for this many microseconds void HAE_WaitMicroseocnds(unsigned long waitAmount) { unsigned long ticks; ticks = HAE_Microseconds() + waitAmount; while (HAE_Microseconds() < ticks) { // Sleep(0); // Give up the rest of this time slice to other threads } }
// wait or sleep this thread for this many microseconds void HAE_WaitMicroseocnds(UINT32 waitAmount) { UINT32 ticks; ticks = HAE_Microseconds() + waitAmount; while (HAE_Microseconds() < ticks) { // $$kk: 09.01.98: this is a *guaranteed* core dump! // i'm not sure if there's some other way we should "yield" here, // but this is certainly not it.... // HAE_SleepFrameThread(NULL, 1); // Give up the rest of this time slice to other threads } }
// wait or sleep this thread for this many microseconds // CLS??: If this function is called from within the frame thread and // JAVA_THREAD is non-zero, we'll probably crash. void HAE_WaitMicroseconds(unsigned long waitAmount) { #if USE_WINDOWS_IO unsigned long ticks; ticks = HAE_Microseconds() + waitAmount; while (HAE_Microseconds() < ticks) { Sleep(0); // Give up the rest of this time slice to other threads } #endif }