aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zencore/include/zencore/thread.h1
-rw-r--r--src/zencore/thread.cpp10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/thread.h b/src/zencore/include/zencore/thread.h
index cc1a692a0..9ff98de8c 100644
--- a/src/zencore/include/zencore/thread.h
+++ b/src/zencore/include/zencore/thread.h
@@ -278,6 +278,7 @@ private:
ZENCORE_API bool IsProcessRunning(int pid);
ZENCORE_API int GetCurrentProcessId();
ZENCORE_API int GetCurrentThreadId();
+int GetProcessId(CreateProcResult ProcId);
ZENCORE_API void Sleep(int ms);
diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp
index 52b1e5d4e..67a0878d0 100644
--- a/src/zencore/thread.cpp
+++ b/src/zencore/thread.cpp
@@ -1095,6 +1095,16 @@ GetCurrentThreadId()
#endif
}
+int
+GetProcessId(CreateProcResult ProcId)
+{
+#if ZEN_PLATFORM_WINDOWS
+ return static_cast<int>(::GetProcessId(ProcId));
+#else
+ return ProcId;
+#endif
+}
+
void
Sleep(int ms)
{