Fixes for Windows.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "angelscript_addons/scriptbuilder/scriptbuilder.h"
|
||||
#include "angelscript_addons/scripthelper/scripthelper.h"
|
||||
#include "angelscript_addons/scriptstdstring/scriptstdstring.h"
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
static void print(const std::string& s) { std::cout << s << std::endl; }
|
||||
|
||||
@@ -22,7 +24,7 @@ int main() {
|
||||
|
||||
std::cout << "Waiting for debugger to attach." << std::endl;
|
||||
while (!debugger.HasDebuggerAttached()) {
|
||||
usleep(1000);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
std::cout << "Debugger attached." << std::endl;
|
||||
|
||||
@@ -84,7 +86,7 @@ class TestClass {
|
||||
ctx->Execute();
|
||||
while (ctx->GetState() != asEXECUTION_FINISHED && ctx->GetState() != asEXECUTION_EXCEPTION &&
|
||||
ctx->GetState() != asEXECUTION_ABORTED && ctx->GetState() != asEXECUTION_ERROR) {
|
||||
usleep(1000);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
|
||||
ctx->Release();
|
||||
|
||||
Reference in New Issue
Block a user