2014-08-28 18:29:05 +02:00
|
|
|
#include "stdafx.h"
|
2014-06-02 19:27:24 +02:00
|
|
|
#include "Emu/System.h"
|
|
|
|
|
#include "Emu/CPU/CPUThread.h"
|
|
|
|
|
|
|
|
|
|
#include "Utilities/SMutex.h"
|
2014-02-05 12:55:32 +01:00
|
|
|
|
2014-08-22 18:36:27 +02:00
|
|
|
bool SM_IsAborted()
|
|
|
|
|
{
|
|
|
|
|
return Emu.IsStopped();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SM_Sleep()
|
2014-02-05 12:55:32 +01:00
|
|
|
{
|
2014-06-20 13:00:36 +02:00
|
|
|
if (NamedThreadBase* t = GetCurrentNamedThread())
|
|
|
|
|
{
|
|
|
|
|
t->WaitForAnySignal();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-07-12 09:02:39 +02:00
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
2014-06-20 13:00:36 +02:00
|
|
|
}
|
2014-02-05 12:55:32 +01:00
|
|
|
}
|